rodrigo_sjc_sp Posted February 7, 2013 Posted February 7, 2013 i have the code (setq i 0) (repeat (sslength selpline) (setq pline_ent (ssname selpline i)) (setq lis_ent (entget pline_ent)) (setq j 0) (setq b 0) (setq lis_coords '()) (repeat (length lis_ent) (if (= (car (nth j lis_ent)) 10) (setq lis_coords (append lis_coords (list (cdr (nth j lis_ent))))) ) (setq j (+ j 1)) ) (print "001") (setq selec (ssget "wp" lis_coords)) (print "002") (repeat (sslength selec) (print "003") (setq entblk (ssname selec b)) (print "004") (setq tipo_l (cdr(assoc 0 (entget entblk)))) (print "005") If i use zoom out the command is ok , run at (print 005) BUT , if i use zoom in the command stop in "002" Specify stretch point or [base point/Copy/Undo/eXit]:1 found "001" "002" ; error: bad argument type: lselsetp nil And the error is in the line (repeat (sslength selec) And the message request Select Object is showed Any Help ? Quote
togores Posted February 7, 2013 Posted February 7, 2013 Hi Rodrigo, to use ssget with the graphic window selection modes (C, CP, F, W, WP) the specified area should be visible on the screen, so it would be wiser to use a zoom extents before. Or maybe if the drawing is too big you could do a zoom window to the extents of the selected polyline. You could use in this case the boundingbox of that entity: (vla-GetBoundingBox (vlax-ename->vla-object (car (entsel))) 'pmin 'pmax) (vla-zoomwindow (vlax-get-acad-object) pmin pmax) Quote
pBe Posted February 8, 2013 Posted February 8, 2013 i have the code (repeat (sslength [b]selpline[/b]) ..... Are these irregular shape polylines? Quote
rodrigo_sjc_sp Posted February 18, 2013 Author Posted February 18, 2013 (edited) Reinaldo, your tip helped me. If the polyline is not showing the whole screen, it returns null. Resolved using zoom Thanks to all (reinaldo and pBe!) Edited February 18, 2013 by rodrigo_sjc_sp Quote
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.