In your code above, where 'ep' is already an entity name as returned by (entlast), Measure would accept just ep rather than (car ep). That, after using the should-have-said (entsel) rather than (entget), pulls the entity name out of the list that (entsel) returns, to give it to the Measure command. I suggested the code that uses (carep ) only "If you want to select it," which I assume would be needed if it's not necessarily the last-drawn entity. I suggested using (ent last) "If you've just drawn it," because of your prefacing your code with "Having just drawn the Lpoly." That would put the last-drawn entity's name into the 'ep' variable. The Measure command is going to require that you give it an entity name. The (ent last) function returns an entity name (ent sel) returns a list of an entity name and the point at which it was selected. You've mixed together elements of two different suggestions. I should changed your 'enget' to (en tsel) rather than just adding the t and parentheses to make (en tget ), and I should have have suggested reading about (entsel) instead of (entget). and it may even be difficult to find the last drawn pline. I don't want to pause to manually select the pline . Its just the measure command that won't accept ep passed to the select objects command. Select object to measure: error: bad argument type: consp (command "measure" (car ep) "Block" "myblock" space "")
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |