mousho Posted June 16, 2018 Share Posted June 16, 2018 (edited) hi everyone im attaching part of code that im using (some lines wrote by lee-mac) the problem in the code is that i need to choose the same pline twice (setq ent / setq se2) i try everything with no success hope that someone can help me (setq ent (car (func (strcat "\nSelect object with " prop " property: ")))) (setq se2 (ssget ":S" '((0 . "LINE,SPLINE,LWPOLYLINE,POLYLINE,ARC,CIRCLE,ELLIPSE")))) new 1.lsp Edited June 16, 2018 by mousho Quote Link to comment Share on other sites More sharing options...
BIGAL Posted June 17, 2018 Share Posted June 17, 2018 If you want pline why not just do the (ssget ss (list (cons 0 "lwpolyline")) Quote Link to comment Share on other sites More sharing options...
dlanorh Posted June 17, 2018 Share Posted June 17, 2018 hi everyoneim attaching part of code that im using (some lines wrote by lee-mac) the problem in the code is that i need to choose the same pline twice (setq ent / setq se2) i try everything with no success hope that someone can help me (setq ent (car (func (strcat "\nSelect object with " prop " property: ")))) (setq se2 (ssget ":S" '((0 . "LINE,SPLINE,LWPOLYLINE,POLYLINE,ARC,CIRCLE,ELLIPSE")))) Have you tried (setq se2 (ssget ":S" '((0 . "LINE,SPLINE,LWPOLYLINE,POLYLINE,ARC,CIRCLE,ELLIPSE")))) (setq ent (ssname se2 0)) Quote Link to comment Share on other sites More sharing options...
mousho Posted June 17, 2018 Author Share Posted June 17, 2018 Work perfect thx for your help i dont understand the line but each day u learn new thing have you tried (setq se2 (ssget ":s" '((0 . "line,spline,lwpolyline,polyline,arc,circle,ellipse")))) (setq ent (ssname se2 0)) Quote Link to comment Share on other sites More sharing options...
dlanorh Posted June 17, 2018 Share Posted June 17, 2018 Work perfectthx for your help i dont understand the line but each day u learn new thing [color=seagreen];The line below is to get a selection set. The ssget ":s" means single selection[/color] [color=seagreen] attempt only and the following list is a list of allowed entity types[/color] (setq se2 (ssget ":s" '((0 . "line,spline,lwpolyline,polyline,arc,circle,ellipse")))) [color=seagreen] [/color] [color=seagreen];The line below accesses the first entity in the selection set assigned to variable se2 [/color] (setq ent (ssname se2 0)) Quote Link to comment Share on other sites More sharing options...
BIGAL Posted June 18, 2018 Share Posted June 18, 2018 Re read post you want to select via variable "PROP" (setq prop "lwpolyline") (princ (strcat "\nSelect object with " prop " property: ")) (setq ss (ssget ":s" (list (cons 0 prop)))) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.