Hey guys
this is a bit of a side project of mine.
im trying to make a program to draw ducts using some dynamic blocks ive made.
ive had a fair bit of sucess with it thanks to the help of these forums but ive hit a wall.
I am trying to input the value of the angle between the 2 ducts into the radial blocks properties but when i do it seems to change.
Code:
(setq radangle (* (if
(> (angle o_p1 o_p2) (angle p1 p2))
(- (angle o_p1 o_p2) (angle p1 p2))
(- (angle p1 p2) (angle o_p1 o_p2))
)
57.2957795)
)
(command "-insert" "MM_Duct_Radius" p3 "" a2)
(setq radblk (vlax-ename->vla-object (ssname (ssget "L") 0))
radblkprops (get-dynprops radblk)
widthprop (cdr (assoc "Width" radblkprops))
angleprop (cdr (assoc "Radius Angle" radblkprops))
ssradblk (ssget "L")
)
(vla-put-value angleprop (vlax-make-variant radangle))
(vla-put-value widthprop (vlax-make-variant (* rd_width 1.0)))
(vla-regen (vla-get-activedocument (vlax-get-acad-object)) AcActiveViewport)