Jump to content

How to pick a 3D polyline


aloy

Recommended Posts

Hello everyone,

I have created a 3d polyline with the following code:

 

(defun Bigal2(lst)
(setq x 0)
(command "_3dpoly")
(while (= (getvar "cmdactive") 1 )
(repeat (length lst)
(command (nth x lst))
(setq x (+ x 1))
)
)
)
(setq pl '((5 5 5) (10 5 4) (10 10 3) (5 10 2) (5 7 1) (5 5 5)))

I then try to pick the same with the following line:

(setq sel1(ssget '((0 . "_3dpoly") (8 . "0"))))

 

It doesn't seem to work. What can be the problem?.

 

Thanks to BIGAL who gave the code for the creation of the "3dpoly".

Edited by aloy
Link to comment
Share on other sites

The entity type (DXF Group 0) for a 3D Polyline entity is "POLYLINE", with bit code 8 enabled in DXF Group 70 to differentiate the entity from a 2D Polyline or Mesh.

 

Therefore your selection filter will need to be:

'((0 . "POLYLINE") (8 . "0") (-4 . "&=") (70 . )

Link to comment
Share on other sites

Thanks very much LM. It works well. Perhaps this could be the solution to the thread under the heading "Poyline error" started by me couple of days ago.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...