This is what I use. this gives me the option to select something or right click/enter to select the last thing modified. tho its kind of backwards with copied items it will select what you made a copy of rather then the copied items made.
;;----------------------------------------------------------------------------;;
;; Select or Previous
(defun SoP ()
(prompt "\nSelect Objects or [Previous]:")
(if (not (setq SS (ssget)))
(setq SS (ssget "_P"))
)
)
-Edit
This is my move command using it.
;;----------------------------------------------------------------------------;;
;; Move Previous if nothing is slected.
(defun C:M (/ SS)
(SoP)
(if SS
(vl-cmdf "._Move" SS "")
(princ "\nNo previous selection set!")
)
(princ)
)
Only got to apologise for posting loads of posts on this thread.... It is nearly where I am happy with it and I'll maybe have another go to make it so.
Hello friends
i have a lot of triangles every triangle is a 3d face
i need help to automatic label the head of a 3d face with its elevation
any help will be appreciated
sample.dwg
A variable is set to the value implied a real, integer or string so (setq dist 200) is just that 200 as a value, if you want it to be inches you need to work with all variable in same units, if you are calculating in feet then need to do (setq dist (/ 200 12.)) note the "." so get a real answer not an integer answer.
If it was me, and it is an occasional occurrence - sometimes happens - I'd break at a point then selecting either side of the break will select the part up to the gap, then you can fix the gap, join it all together. However it is only an occasional thing for me so I have never needed to do any more than that (most often if (ahem) "Someone else" draws a polyline to be hatched with a gap - but my drawings don't have a lot of hatching)
I would run the join command to make it a polyline. then this will add a circle to current layer at the start point of any open polyline selected.
;;----------------------------------------------------------------------;;
;; Marks Polyline start and end points
(defun C:OP (/ mspace SS)
(setq mspace (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object))))
(while (setq SS (ssget '((0 . "*POLYLINE") (70 . 0))))
(foreach poly (vl-remove-if 'listp (mapcar 'cadr (ssnamex SS)))
(setq cir (vla-AddCircle mspace (vlax-curve-getstartpoint poly) 1)) ;change 1 to a radius you want.
(vla-put-color cir 3)
(setq cir (vla-AddCircle mspace (vlax-curve-getendpoint poly) 1))
(vla-put-color cir 1)
)
)
(princ)
)
I think it has to do with the font your using. not all character numbers are the same in each font. to find the correct number use the following
(ascii "°")
mine its 176 so then use that number with (chr
(setq nbrg2 (strcat (itoa intd) (chr 176) mint "'" sec (chr 34)))
This will display all your character numbers of the current font.
https://www.cadtutor.net/forum/topic/75383-text-ascii/?do=findComment&comment=596047