abra-CAD-abra Posted June 25, 2015 Share Posted June 25, 2015 Trying to get to grips with VLISP by modifying example code to suit my needs, I have hit a brick wall with this one: (defun c:Test (/ acadObj doc ss oML modelSpace sBlock MLval) (vl-load-com) ;Modified VLISP example from Autodesk ActiveX Reference Guide ;Change MLeader content type from BLOCK to MTEXT assigning attribute value to text string (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) (setq modelSpace (vla-get-ModelSpace doc)) (setq ss (ssget "_:L" '((0 . "MULTILEADER")))) (repeat (setq i (sslength ss)) (setq oML (vlax-ename->vla-object (ssname ss (setq i (1- i))))) (setq sBlock (vla-get-ContentBlockName oML)) (vlax-for o (vla-Item (vla-get-Blocks doc) sBlock) (setq MLval (vla-GetBlockAttributeValue oML (vla-get-ObjectID o))) ;Read MLeader Block Attribute Value (vla-put-contenttype oML acMTextContent) ;Change MLeader Content Type to MTEXT (vla-put-textstring oML MLval) ;Assign Attribute Value to MTEXT text string ) ) (vla-Update acadObj) ) Can anybody help? Cheers, Quote Link to comment Share on other sites More sharing options...
BIGAL Posted June 26, 2015 Share Posted June 26, 2015 Maybe a typo vla-Get-BlockAttributeValue Quote Link to comment Share on other sites More sharing options...
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.