gpd Posted July 27, 2010 Posted July 27, 2010 Hi All Is it possible to select entities in by providing their HANDLE value to ssget or any other function. I have tried but result is nil. Command: (setq han(vla-get-handle(vlax-ename->vla-object(car(entsel))))) Select object: "B9" Command: (setq ss(ssget "X" (list (cons 5 han)))) nil Thanks Quote
Lee Mac Posted July 27, 2010 Posted July 27, 2010 Alternatively, (vla-HandletoObject (vla-get-ActiveDocument (vlax-get-acad-object) ) <handle> ) Should you want the VLA Object... Quote
Se7en Posted July 27, 2010 Posted July 27, 2010 Alternatively, (vla-HandletoObject (vla-get-ActiveDocument (vlax-get-acad-object) ) <handle> ) Should you want the VLA Object... (defun c:Test ( / ent-selected enthandle objHandle ) (setq ent-selected (car (entsel)) enthandle (cdr (assoc 5 (entget ent-selected))) objHandle (vla-get-handle (vlax-ename->vla-object ent-selected)) ) (entdel (handent enthandle)) ;; del the item (redraw) ;;; ;;; This would toss a nasty if used here.. ;;; ;;; (vla-HandletoObject ;;; (vla-get-ActiveDocument ;;; (vlax-get-acad-object) ;;; ) ;;; objHandle ;;; ) (entdel (handent enthandle)) ;; un-del the item (redraw) ;;; Now we can select the items ;;; (vla-HandletoObject (vla-get-ActiveDocument (vlax-get-acad-object) ) objHandle ) ) Quote
iTijn Posted August 10, 2010 Posted August 10, 2010 Hi All, I want to do the same thing, but unfortunately haven't found the answer yet. As fillet isn't easilly programmed I want to 'abuse' the commandline to do it. Example: (Yes I still use VBA) Sub Test4() Dim Commandstring As String Commandstring = "(command ""_fillet"" ""_p"" pause) " ThisDrawing.SendCommand (Commandstring) End Sub Now I would like to replace the "pause" with something that selects the polyline by handle. Is that possible? Thanks 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.