I created a profile (solprof) from a solid and selected it. This profile is created as a object "INSERT".
(arxload "acsolids")
(setq ss (ssget))
(VL-CMDF "_LAYOUT" "SET" "Layout1" "MSPACE")
(c:solprof ss "y" "y" "n")
(VL-CMDF "_LAYOUT" "SET" "Model")
(setq profObj (vlax-ename->vla-object (ssname (ssget "_X" '((0 . "INSERT") (8 . "PV-*") (410 . "Model"))) 0)))
Then I exploded the "INSERT", transforming into serveral lines.
(setq explodedObjects (vlax-variant-value (vla-Explode profObj)))
Then I joined the lines with:
(vla-SendCommand (vla-get-ActiveDocument (vlax-get-acad-object))
(strcat "JOIN (ssget \"_X\" '((0 . \"LINE\") (8 . \"PV-*\") (410 . \"Model\"))) "))
And that's where the problem occurs. If I click on the drawing screen and use the (entlast) it selects the polyline that has been "joined". But if the code drives it all straight, when it arrives at that part it does not find the line that was "joined".
(setq lapPLineEnt (ssname (ssget "_X" '((0 . "LWPOLYLINE") (8 . "PV-*") (410 . "Model"))) 0))