Jump to content

Recommended Posts

Posted
1 hour ago, lastknownuser said:

I don't understand why this VERTEX entmake, and it probably adds it in selection set but doesn't create it, so can't copy it therefore it gives error
 


Oh you are creating a polyline that way...still the same problem and probably the solution. For example and what I tested only is this polyline creation part, lets say you have 6 pntucssort points, you are creating vertices and then you create polyline. The way you are creating your selection set of all created objects after profile_lastEnt, profile_ss has length of 7 (6 vertices and polyline). But you want to copy only polyline, can't copy vertices therefore the error. So you need to make selection set only with objects that are actually created and can be copied. So after creating each object (polyline, and later blocks and texts if I saw correctly) add that (entlast) to selection set. Or you could filter the selection set before ctd function to remove vertices, but I would filter them as objects are created, so after each object created put this:
 

(setq obj (entlast))
(ssadd obj profile_ss)

 

  • Thanks 1
Posted

to lega!

that really worked, didn't know it adds vertices+poly in ss, so in other part in lisp where i have more objects created after poly it iterates normally , but when it's just poly you have to account for vertices, thank you

  • Like 1
Posted

now i'm not sure how to delete poly in original drawing after copying , tried (entdel (entlast)), (entdel obj), even used this function and called it (entdel(lastent)) but nothing works

(defun lastent (/ a b) 
  (if (setq a (entlast))         ;Gets last main entity
    (while (setq b (entnext a))  ;If subentities follow, loopsuntil there are no more 
      (setq a b)                 ;subentities 
    ) 
  ) 
  a                              ;Returns last main entity 
)                                ;or subentity

 

Posted

solved it with

(command "._erase" (entlast) "")

once again the easiest thing is the solution

thank you all for contributing!🙌

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...