[Help] Get variables from othe
Hi all,I've a problem and i can't solve it by myself, please help me
I want to get some variable from other Drawing (but not open it in Editor), so i've to use DBX.
I have this :
(defun get_sth ()(defun _ObjectDBXDocument ( acapp / acVer ) (vla-GetInterfaceObject acapp (if (< (setq acVer (atoi (getvar "ACADVER"))) 16) "ObjectDBX.AxDbDocument" (strcat "ObjectDBX.AxDbDocument." (itoa acVer)) ) ) ) (setq acapp (vlax-get-acad-object))(setq dbdoc (_ObjectDBXDocument acapp) dwg "D:\\Test.dwg") ; this file exist already(setq doc (cond ((not (vl-catch-all-error-p (vl-catch-all-apply 'vla-open (list dbdoc dwg)))) dbdoc ) ) ); What will i do here to get sth infor of variable, ex Clayer, or Dim variable or sth else ...?;vla-getvariables not work)
I've tried to read others rountine about DBX , but ...
Please help me.
Thanks for reading I'm pretty sure you cannot accomplish this using traditional methods (getvar, setvar, etc.). You have to use the ActiveX Object Model.
For example, look into the ActiveLayer Property of the Layer Collection of DbDoc. Thanks you verymuch.. But i wonder what about with other variables store in DWG ? We can't access it ?? Perhaps this will clarify:
</blockquote>
linky Thank you again for information ^^ So i will try open then close it ^^ You're welcome; again, this is to the best of my knowledge.
If there exists a way to accomplish this (via ObjectDBX), I too would be very interested to know.
页:
[1]