Hey everyone!
I have been dealing with this issue for quite some time and cannot seem to figure it out. I have thought about maybe having a Lisp receive the user selected polylines, then dumping the info of them and sending it to DIESEL and retrieving the calculated numbers from DIESEL and spitting it out to the user in an alert but i can't seem to get it to work since I am unable to run any VLAX code.
So, is there any way such as a workaround or a different route to take that can be used instead of the VLAX in the code below.. (Copy and pasted from an old post)
Uhh?... should look like this:(defun C:PolyLength ( / CurEnt CurLgt CurSet EntCnt TmpLgt TmpVal)
(setq CurSet (ssget '((0 . "LWPOLYLINE,POLYLINE") (410 . "Model")))
EntCnt 0
CurLgt 0.0
)
(if CurSet
(while (< EntCnt (sslength CurSet))
(setq CurEnt (ssname CurSet EntCnt)
TmpVal (vlax-curve-getEndParam CurEnt)
TmpLgt (vlax-curve-getDistAtParam CurEnt TmpVal)
CurLgt (+ CurLgt TmpLgt)
EntCnt (1+ EntCnt)
)
)
)
(alert
(strcat
(itoa (sslength CurSet)) " Polylines found"
" with a total length of " (rtos CurLgt) " units."
)
)
(princ)
)