Message 1 of 11

Not applicable
09-20-2016
10:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to bind the Xref in a drawing, without open that drawing. I have 120 drawings to bind.
I have tried below coding.
(setq ver (substr (vla-get-version (vla-get-application (vla-get-activedocument (vlax-get-acad-object)))) 1 2)) (setq DbDoc (strcat "ObjectDBX.AxDbDocument." ver)) (setq DdBx (vla-getinterfaceobject (vlax-get-acad-object) DbDoc)) (setq cFile (getfiled "Select Drawing File" "" "dwg" 4)) (vlax-invoke-method DdBx 'open cFile) (setq blk (vla-get-blocks DdBx))
(setq n 0)
(repeat (vla-get-count blk)
(setq item (vla-item blk n))
(if (eq (vla-get-isxref item) :vlax-true)
(prong
(vla-bind item :vlax-false)
);prong
);if
(setq n (1+ n))
);repeat
But It returns the error. "Automation Error.Key Not Found"
Please help in this.
Thanks in advance
STM
Solved! Go to Solution.