TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: iwill on August 31, 2020, 09:18:42 AM

Title: Automation error is prompted when using VLA-activate.Document switching is disab
Post by: iwill on August 31, 2020, 09:18:42 AM
Automation error is prompted when using VLA-activate.Document switching is disabled.Is there a system variable setting problem

Code: [Select]

(vl-load-com)
(setq app (vlax-get-acad-object))
(setq docs (vla-get-documents app))
(setq doc (vla-item docs "yf.dwg"))
(vla-activate doc)

Title: Re: Automation error is prompted when using VLA-activate.Document switching is disab
Post by: Crank on September 05, 2020, 05:45:21 AM
Look over here. (https://www.afralisp.net/archive/methods/list/activate_method.htm)
Title: Re: Automation error is prompted when using VLA-activate.Document switching is disab
Post by: jbuzbee on September 09, 2020, 09:47:43 AM
Code: [Select]
(vl-load-com)
(setq app  (vlax-get-acad-object)
      docs (vla-get-documents app)
      doc  (vla-item docs "X_Base.dwg")
      )
(vla-activate doc)

Works for me