Lt Dan's legs Posted August 25, 2011 Posted August 25, 2011 When you (vlax-dump-object (setq [u][b]v[/b][/u] (vlax-ename->vla-object (car (entsel))) ) t ) a flip parameter you get ; IAcadBlockFlipActionEntity: IAcadBlockFlipActionEntity Interface ; Property values: ; ActionType (RO) = "Flip" ; etc. ; ObjectName (RO) = "AcDbBlockFlipActionEntity" ; etc. ; Methods supported: ; ArrayPolar (3) ; ArrayRectangular (6) ; Copy () ; Delete () ; GetBoundingBox (2) ; GetExtensionDictionary () ; GetXData (3) ; Highlight (1) ; IntersectWith (2) ; Mirror (2) ; Mirror3D (3) ; Move (2) ; Rotate (2) ; Rotate3D (3) ; ScaleEntity (2) ; SelectionSet () ; SetSelectionSet (1) ; SetXData (2) ; TransformBy (1) ; Update () but if you try to use (vla-Selectionset v) or (vlax-invoke v 'SelectionSet) you'll get ; error: no function definition: VLA-SELECTIONSET How do I go about adding an object to the flip parameter without using command calls? Quote
Lt Dan's legs Posted August 26, 2011 Author Posted August 26, 2011 (edited) I figured it out. NOTE: Use editing a dynamic block (in block editor). (defun c:test ( / ss->lst action ss ) (vl-load-com) (defun ss->lst ( ss flag / id lst ) (if (eq 'PICKSET (type ss)) (repeat (setq id (sslength ss)) ( (lambda ( name ) (setq lst (cons (if flag (vlax-ename->vla-object name) name )lst ) ) )(ssname ss (setq id (1- id))) ) ) ) ) (if (and (or (eq 1 (getvar 'blockeditor))(prompt "\n**Must be in block editor to use!**")) (setq action (car (entsel "\nSelect an Action Entity: "))) (setq action (vlax-ename->vla-object action)) (setq ss (ss->lst (ssget) t)) ) ( (lambda ( group ) (vlax-invoke-method action 'SetSelectionSet (vlax-make-variant (vlax-safearray-fill (vlax-make-safearray vlax-vbobject (cons 0 (1- (length group))) ) group ) ) ) ) (append (vlax-safearray->list (vlax-variant-value (vlax-invoke-method action 'SelectionSet) ) ) ss ) ) ) (princ) ) Edited August 26, 2011 by Lt Dan's legs forgot vl-load-com 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.