ollie Posted July 17, 2009 Posted July 17, 2009 Hi All I am trying to use the vla-get-promptstring for an attribute definition ;vlax-safearray->list (getattribute) method However the response i recieve is error: ActiveX Server returned the error: unknown name: Any thoughts Cheers Ollie Quote
Lee Mac Posted July 17, 2009 Posted July 17, 2009 You will have to approach it this way Ollie to get the Prompt String: (defun getpmt (blk) (if (tblsearch "BLOCK" blk) (vlax-for Obj (vla-item (vla-get-Blocks (vla-get-Activedocument (vlax-get-acad-object))) blk) (if (eq "AcDbAttributeDefinition" (vla-get-ObjectName Obj)) (setq pmt (vla-get-PromptString Obj))))) pmt) Quote
ollie Posted July 18, 2009 Author Posted July 18, 2009 Once again Lee thanks. Can't believe how complicated that is in comparison to the grab properties for the other members Ollie Quote
Lee Mac Posted July 18, 2009 Posted July 18, 2009 No problem Ollie. Bear in mind that the above will cycle through every attribute definition (if there is more than one) - and so you may need to filter it for attribute tagstring also. Lee 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.