Author Topic: Change D_TEXTSIZE crashes DesignCAD  (Read 149 times)

Gymbo

  • Jr. Member
  • **
  • Posts: 77
Change D_TEXTSIZE crashes DesignCAD
« on: April 09, 2018, 11:39:34 AM »
There are obviously several things I need to learn.

Line 15 does not show the size of the text in my drawing. Restoring line 16 and commenting line 17 does not change the size of the text. And run the macro as shown crashes DC. :'(

Code: [Select]
'change dimension text size based on drawing size
INCLUDE "dcadalias.d3i"
Alias D_TEXTSIZE &H0A04
Alias D_ARROWSIZE   &H0A03
x = sys(122) 'max x value
y = sys(120) 'min x value
z = x - y
a = z * 0.03 'size of header text
b = a * 0.5 ' size of dim text
en = sys(9)
message z, a, b, en
for i = 1 to en
getattr i, type
if type = 75 then
message sys(438)   'line 15
'sys(438) = b
change D_TEXTSIZE, b
end if
next
end
Regards,

Jim

bdeck

  • Hero Member
  • *****
  • Posts: 881
Re: Change D_TEXTSIZE crashes DesignCAD
« Reply #1 on: April 09, 2018, 11:15:39 PM »
Change will not work unless preceded by the "entity" statememnt and followed by the "update" statement. Dunno if that is causing the crash.

Gymbo

  • Jr. Member
  • **
  • Posts: 77
Re: Change D_TEXTSIZE crashes DesignCAD
« Reply #2 on: April 10, 2018, 09:07:55 AM »
Thanks, that was it.
Regards,

Jim