0 Members and 1 Guest are viewing this topic.
(vlax-dump-object mlstyles T); IAcadDictionary: A container object for storing and retrieving objects; Property values:; Application (RO) = #<VLA-OBJECT IAcadApplication 0000000140db8ca0>; Count (RO) = 1; Document (RO) = #<VLA-OBJECT IAcadDocument 0000000045a0ea80>; Handle (RO) = "188B"; HasExtensionDictionary (RO) = 0; Name = "ACAD_MLEADERSTYLE"; ObjectID (RO) = 451; ObjectID32 (RO) = 451; ObjectName (RO) = "AcDbDictionary"; OwnerID (RO) = 450; OwnerID32 (RO) = 450; Methods supported:; AddObject (2); AddXRecord (1); Delete (); GetExtensionDictionary (); GetName (1); GetObject (1); GetXData (3); Item (1); Remove (1); Rename (2); Replace (2); SetXData (2)T
(vla-addobject mlstyles "SheetNote")too few actual parameters_1$ (vla-addobject mlstyles "SheetNote" 1); error: Automation Error. AcRxClassName entry is not in the system registry_2$ (vla-addobject mlstyles "SheetNote" 0); error: Automation Error. AcRxClassName entry is not in the system registry_3$
I use vlax-invoke like so (no error checking)Code - Auto/Visual Lisp: [Select](vlax-invoke (vlax-ename->vla-object (cdr (assoc -1 (dictsearch (namedobjdict) "ACAD_MLEADERSTYLE"))) ) 'addobject "test" "AcDbMLeaderStyle")
I could not get your code to work with AutoCAD 2010 below. Can you tell me what changes with this version? ThanksQuote from: ronjonp on August 07, 2012, 10:59:27 AMI use vlax-invoke like so (no error checking)Code - Auto/Visual Lisp: [Select](vlax-invoke (vlax-ename->vla-object (cdr (assoc -1 (dictsearch (namedobjdict) "ACAD_MLEADERSTYLE"))) ) 'addobject "test" "AcDbMLeaderStyle")
Quote from: velasquez on June 02, 2014, 05:36:22 PMI could not get your code to work with AutoCAD 2010 below. Can you tell me what changes with this version? ThanksQuote from: ronjonp on August 07, 2012, 10:59:27 AMI use vlax-invoke like so (no error checking)Code - Auto/Visual Lisp: [Select](vlax-invoke (vlax-ename->vla-object (cdr (assoc -1 (dictsearch (namedobjdict) "ACAD_MLEADERSTYLE"))) ) 'addobject "test" "AcDbMLeaderStyle")Are you getting any errors? Unfortunately I do not have access to AutoCAD 2010 but can confirm this code works in AutoCAD 2015.
Looks like it is a bug:http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/Help-Error-creating-mleaderstyle/td-p/3050426
(dictadd DIC "MyLeaderStyle" OBJ)
Thanks or all the answers. I will work with the code below.Code: [Select](dictadd DIC "MyLeaderStyle" OBJ)
Quote from: velasquez on June 03, 2014, 05:46:04 PMThanks or all the answers. I will work with the code below.Code: [Select](dictadd DIC "MyLeaderStyle" OBJ)Going through my notes, be very careful with this one, it can cause data corruption and/or application crashes under certain circumstances. I didn't take as detailed notes as I should have, but I know one of the circumstances was if you use any LISP Reactors. I know there were other things we found that caused problems with this one as well. It is possible that the problem have been corrected in 2014 or newer, as I haven't tried with these versions, but I know 2013 and older had these issues.