DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Dimension Distance Only Macro

Started by Mark Laing, September 07, 2007, 08:10:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mark Laing


This is just a patch for version 18.0
It measures distance without arrows.






'DimDistOnly.d3m

GetDist:
'''''''''''''''''''''''''''
Sys(41) = 1 'Sets Rubberband type to line
SetPoint "Set 2 points for measuring distance and angle.", 2
PointVal x1 y1 z1 1
PointVal x2 y2 z2 2
x3=(x1+x2)/2
y3=(y1+y2)/2
z3=(z1+z2)/2
Sys(41) = 0 'Sets Rubberband type to none

''''''''''''''''''''''''

' Enable silent mode to disable the text box for the AngleDistance 'command
Sys(36) = 1

>AngleDistance
{
<PointXYZ [x1, y1, z1]
<PointXYZ [x2, y2, z2]
}

' Disable the silent mode
Sys(36) = 0

'Message "The distance is ", Sys(650)

Precision Sys(106) 'Dimension precision [-7<=x<=15]

Dist$ = SYS(650)
TextAngle=SYS(651)

print:
Sys(36) = 0  'Silent mode off
'Sys(36) = 1  'Silent mode on
'SYS(242)=1  'Select object when created [0=no, 1=yes]
>text2d
{
<Style 2
<Justification 1
<text  [Dist$]"'"
<angle [TextAngle]
<DrawAs2dText
'<PointXYZ [x3, y3, z3]
}

Sys(36) = 0  'Silent mode off

'SYS(242)=0  'Select object when created [0=no, 1=yes]

End