TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: JohnSnow on May 13, 2022, 02:16:47 AM

Title: Get named object dictionary of other drawing
Post by: JohnSnow on May 13, 2022, 02:16:47 AM
Hi,

I know (namedobjdict) allows me to get the named object dictionary of the current drawing but I want to get named object dictionary of other drawing. Is it possible to do it by visual lisp? Thanks
Title: Re: Get named object dictionary of other drawing
Post by: roy_043 on May 13, 2022, 08:33:12 AM
The namedobjdict is the dictionaries collection in VL.
Code - Auto/Visual Lisp: [Select]
Title: Re: Get named object dictionary of other drawing
Post by: 57gmc on May 13, 2022, 10:42:55 AM
Hi John, is the other dwg loaded in the current acad session, or just a file on disc? If you want the dictionaries collection of a loaded drawing, then access it from the application object's Documents collection. If it's a file on disc, you use objectdbx. You can find more info on that by searching in this forum.
Title: Re: Get named object dictionary of other drawing
Post by: JohnSnow on May 13, 2022, 11:40:32 PM
It is loaded in acad (not the active one though)
I will try objectdbx to get that drawing and then use the vla-get-dictionaries method that roy mentions.
Thank you guys .
Title: Re: Get named object dictionary of other drawing
Post by: It's Alive! on May 14, 2022, 12:12:44 AM
It is loaded in acad (not the active one though)
I will try objectdbx to get that drawing and then use the vla-get-dictionaries method that roy mentions.
Thank you guys .

vla-get-documents = Document collection of all opened drawings in current session.
then find the one you you would like to reference
Title: Re: Get named object dictionary of other drawing
Post by: JohnSnow on May 14, 2022, 12:55:25 AM
vla-get-documents = Document collection of all opened drawings in current session.
then find the one you you would like to reference

Thanks.