![]() |
【转帖】loading an xref into the current drawing
loading an xref into the current drawing
loading an xref into the current drawing hi everyone, is there an example into the documentation showing how to load and display an xref into the drawing ? could anyone post a sample piece of code ? i see there is something related to xref into the odamfc app, but i can't understand how to use it... :-s thank you very much carlo. see xrefman.h (oddbxrefman::load() ) if you vectorize the drawing xrefs will be loaded automatically - you need not call load() manually. sergey slezkin thank you very much sergey, but perhaps i used a wrong word to explain my problem... i need the method to add a new xref to a database and to delete an existing xref from a database... sorry for the misunderstanding carlo. see odwriteex sample. dbfiller.cpp dbfiller::addxref() function. to delete an xref you need call erase() for its blocktablerecord (and for its block references surely). sergey slezkin thanks for the answer just another question : the path of the xref is an absolute path ? if i move both the dwg and the xref file to another location, the referenced dwg is still found ? is it possible to save a relative path ? (relative to the path of the dwg loading the xref i mean...) thanks again ! last edited by carlo@zirak.it; 25th july 2008 at 01:17 amfff">. the xref file path can be absolute or relative. to locate the xref dwgdirect calls oddbhostappservices::findfile() (note, the help is not absolutely correct. where is default implementation which behavior is described in the help). findfile() can be overloaded in client services class. even if the path specified is absolute after trying absolute path dd will try to locate the file in drawing's folder. sergey slezkin quote: originally posted by sergey slezkin the xref file path can be absolute or relative. to locate the xref dwgdirect calls oddbhostappservices::findfile() (note, the help is not absolutely correct. where is default implementation which behavior is described in the help). findfile() can be overloaded in client services class. ok, understood quote: originally posted by sergey slezkin the xref file path can be absolute or relative. even if the path specified is absolute after trying absolute path dd will try to locate the file in drawing's folder. great !! this was exactly what i need thanks again! |
所有的时间均为北京时间。 现在的时间是 11:05 AM. |