Hello,
i have a short LISP and it works great on most computers, however, on some I am getting sth that could be translated as "Bad SSGET mode string". I think that could be language dependent. Any clues ?
(defun c:samples2polys (/ doc ms obj grp verts polyverts pline)
(if (setq ss (ssget":S" '((0 . "AECC_SAMPLE_LINE"))))
(progn
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(setq ms (vla-get-modelspace doc))
(setq obj (vlax-ename->vla-object (ssname ss 0)))
(setq grp (vlax-get obj 'parent))
(setq idx -1)
(vlax-for sl (vlax-get grp 'samplelines)
(setq verts (vlax-get sl 'vertices))
(setq polyverts '())
(vlax-for v verts
(setq x (vlax-get v 'location))
(setq polyverts (append polyverts (list (car x) (cadr x))))
)
(setq pline (vlax-invoke ms 'addlightweightpolyline polyverts))
(vla-put-thickness pline (vlax-get sl 'station))
(vla-add (vla-get-hyperlinks pline) "profile")
)
)
)
(princ)
)
Solved! Go to Solution.
Link copied