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.

Construction Line Redo

Started by Gymbo, April 06, 2018, 01:41:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Gymbo

This macro place a blue dashed construction line on layer seven and scales the style based on the x scale of the drawing then returns to the working layer with the working line type, scale and color, works reasonably well from very small to about 100 feet.

'create construction line on layer 7
a = sys(601) 'max x display
b = sys(600) 'minimum x display
c = a - b
x = sys(122) 'max x value
y = sys(120) 'min x value
z = x - y
sys(1009) = 1 'make Constr line visible
CL = sys(3)  'current layer
LT = sys(4) 'current line type
LS = sys(5)  'current line style

if z > c then z = c 'use a
if z < 10 then 'log of a negative number
sl = 0.1
goto here
end if
sl = (ln(z-8)-1/ln(10))/2
here:
>ConstructionLine
{
  <Color 128,128,255
  <Layer 7
  <LineStyle 1,[sl],0 '0.3 was sl
  <Type 0
}
sys(3) = cl
layer(7) = 6
sys(4) = lt
sys(5) = ls
sys(26) = 0
End


Edit: 4/7/2018 to add display width or drawing width
Regards,

Jim