Author Topic: Get named object dictionary of other drawing  (Read 950 times)

0 Members and 1 Guest are viewing this topic.

JohnSnow

  • Newt
  • Posts: 52
Get named object dictionary of other drawing
« 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

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Get named object dictionary of other drawing
« Reply #1 on: May 13, 2022, 08:33:12 AM »
The namedobjdict is the dictionaries collection in VL.
Code - Auto/Visual Lisp: [Select]

57gmc

  • Bull Frog
  • Posts: 358
Re: Get named object dictionary of other drawing
« Reply #2 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.

JohnSnow

  • Newt
  • Posts: 52
Re: Get named object dictionary of other drawing
« Reply #3 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 .
« Last Edit: May 13, 2022, 11:45:44 PM by JohnSnow »

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8662
  • AKA Daniel
Re: Get named object dictionary of other drawing
« Reply #4 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

JohnSnow

  • Newt
  • Posts: 52
Re: Get named object dictionary of other drawing
« Reply #5 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.