cad import vcl: xref search path
Moderators: SDS, support, admin
cad import vcl: xref search path
Добрый день,
Возможно ли указать папки Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка xrefs при конвертировании dxf в картинку, или надо вручную добавлÑÑ‚ÑŒ вÑе файлы через tsgdxfimage.converter.addxref?
Возможно ли указать папки Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка xrefs при конвертировании dxf в картинку, или надо вручную добавлÑÑ‚ÑŒ вÑе файлы через tsgdxfimage.converter.addxref?
ЗдравÑтвуйте!
Ðе могли бы Ð’Ñ‹ подробнее поÑнить ÑтоÑщую перед Вами задачу:
что имеетÑÑ Ð½Ð° входе и что должно быть на выходе?
Сергей.
Please post questions to the forum or write to support@cadsofttools.com
Ðе могли бы Ð’Ñ‹ подробнее поÑнить ÑтоÑщую перед Вами задачу:
что имеетÑÑ Ð½Ð° входе и что должно быть на выходе?
Сергей.
Please post questions to the forum or write to support@cadsofttools.com
ЕÑÑ‚ÑŒ файл .dxf и его надо конвертировать в bmp. Как Ñто Ñделать Ñ ÑƒÐ¶Ðµ разобралÑÑ, однако в dxf еÑÑ‚ÑŒ иÑпользует внешние файлы (xrefs). Можно ли как-то указать папку в которой лежат Ñти файлы чтобы компонент Ñам автоматом брал иÑкал нужные файлы в Ñтой папке или нужно каждый файл xref добавлÑÑ‚ÑŒ через функцию tsgdxfimage.converter.addxref?
ЗдравÑтвуйте,
ÑоглаÑно документации AutoCAD®, в DXF/DWG-файле XREF-путь может быть указан в полном виде (например: "C:\Drawings\Xref1.dwg") или отноÑительном (например: "..\Xref1.dwg").
ЕÑли по указанному пути наш компонент не находит требуемый файл, то, по аналогии Ñ AutoCAD®, поиÑк Ñтого файла проиÑходит в текущей Ñ "чертежом-контейнером" (чертёж, имеющий XREF'Ñ‹) папке.
Ð’ данный момент нет ÑредÑтв Ð´Ð»Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ð¿Ð°Ð¿ÐºÐ¸ поиÑка Xref'ов.
ВероÑтно, в Вашем "чертеже-контейнере", указаны полные пути, которые не ÑущеÑтвуют. Ðа наш взглÑд, решением проблемы было бы проÑтое копирование чертежей в текущую Ñ "чертежом-контейнером" папку.
ЕÑли Ð’Ñ‹ не находите решением данное указание, мы можем в чаÑтном порÑдке добавить требуемый Ð´Ð»Ñ Ð’Ð°Ñ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ð¾Ð½Ð°Ð» (за более детальной информацией обращайтеÑÑŒ на [url="mailto:info@cadsofttools.com"]info@cadsofttools.com[/url] Ñо ÑÑылкой на данную тему форума).
- - -
Yours faithfully,
Pavel Poltavets,
senior developer Soft Gold Ltd.
ÑоглаÑно документации AutoCAD®, в DXF/DWG-файле XREF-путь может быть указан в полном виде (например: "C:\Drawings\Xref1.dwg") или отноÑительном (например: "..\Xref1.dwg").
ЕÑли по указанному пути наш компонент не находит требуемый файл, то, по аналогии Ñ AutoCAD®, поиÑк Ñтого файла проиÑходит в текущей Ñ "чертежом-контейнером" (чертёж, имеющий XREF'Ñ‹) папке.
Ð’ данный момент нет ÑредÑтв Ð´Ð»Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ð¿Ð°Ð¿ÐºÐ¸ поиÑка Xref'ов.
ВероÑтно, в Вашем "чертеже-контейнере", указаны полные пути, которые не ÑущеÑтвуют. Ðа наш взглÑд, решением проблемы было бы проÑтое копирование чертежей в текущую Ñ "чертежом-контейнером" папку.
ЕÑли Ð’Ñ‹ не находите решением данное указание, мы можем в чаÑтном порÑдке добавить требуемый Ð´Ð»Ñ Ð’Ð°Ñ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ð¾Ð½Ð°Ð» (за более детальной информацией обращайтеÑÑŒ на [url="mailto:info@cadsofttools.com"]info@cadsofttools.com[/url] Ñо ÑÑылкой на данную тему форума).
- - -
Yours faithfully,
Pavel Poltavets,
senior developer Soft Gold Ltd.
This topic subject looks like something I am very interested in. Unfortunately I can't read anything here...
I am looking for a way to specify a path to search for XREFs in the same way that a path to fonts can be specified.
That is, most of my customers use "title blocks" that are an XREF in every drawing. When my program prints the drawing, it can't find the XREF (or MREF?) because the path is specified in AutoCAD - and not saved in the drawing itself.
So, is there a way to add "look over there in folder xxx" when trying to load an XREF?
Thanks,
EdB
I am looking for a way to specify a path to search for XREFs in the same way that a path to fonts can be specified.
That is, most of my customers use "title blocks" that are an XREF in every drawing. When my program prints the drawing, it can't find the XREF (or MREF?) because the path is specified in AutoCAD - and not saved in the drawing itself.
So, is there a way to add "look over there in folder xxx" when trying to load an XREF?
Thanks,
EdB
According to the AutoCAD documentation, an XREF path in DWG/DXF file can be absolute (e. g. "C:\Drawings\Xref1.dwg") or relative (e. g. "..\Xref1.dwg"). If our component doesn't find the referenced file on the given path, then similar to AutoCAD, this file is searched in the current folder ( a folder where a file with XREFs is located ).
For now we don't offer a tool for indicating a folder where the referenced files are searched.
Probably, your drawing contains XREFs having absolute paths that don't exist. In our opinion, the problem could be solved by copying the referenced files into the drawing's current folder.
If you are not satisfied with such solution we could privately add the required functionality ( for details email to info@cadsofttools.com with reference on this forum topic).
- - -
Yours faithfully,
Pavel Poltavets,
senior developer Soft Gold Ltd.
For now we don't offer a tool for indicating a folder where the referenced files are searched.
Probably, your drawing contains XREFs having absolute paths that don't exist. In our opinion, the problem could be solved by copying the referenced files into the drawing's current folder.
If you are not satisfied with such solution we could privately add the required functionality ( for details email to info@cadsofttools.com with reference on this forum topic).
- - -
Yours faithfully,
Pavel Poltavets,
senior developer Soft Gold Ltd.
Мы добавили возможноÑÑ‚ÑŒ ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ð¿ÑƒÑ‚Ð¸ Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка XRef. За Ñто отвечает новое ÑвойÑтво: <b>TsgDXFConverter.XRefSearchPath</b>. Ð’ Ñлучае, еÑли файл по XReference не находитÑÑ Ð¿Ð¾ указанному в нём пути и также не находитÑÑ Ð² каталоге Ñ Ñ‚ÐµÐºÑƒÑ‰Ð¸Ð¼ файлом-контейнером, то он ищетÑÑ Ð¿Ð¾ пути, указанному в TsgDXFConverter.XRefSearchPath.
Ðиже имеетÑÑ Ð¿Ñ€Ð¸Ð¼ÐµÑ€ иÑпользованиÑ.
<b>English</b>:
We have added ability of defining a search path for missing XRefs. New property is responsible on this task: <b>TsgDXFConverter.XRefSearchPath</b>. When no XRef could be found by its path or in the same folder with file-container, the search will be implemented by the path defined in the <b>TsgDXFConverter.XRefSearchPath</b>.
Downwards goes an example.
Sergey.
Please post questions to the forum or write to support@cadsofttools.com
Ðиже имеетÑÑ Ð¿Ñ€Ð¸Ð¼ÐµÑ€ иÑпользованиÑ.
<b>English</b>:
We have added ability of defining a search path for missing XRefs. New property is responsible on this task: <b>TsgDXFConverter.XRefSearchPath</b>. When no XRef could be found by its path or in the same folder with file-container, the search will be implemented by the path defined in the <b>TsgDXFConverter.XRefSearchPath</b>.
Downwards goes an example.
Code: Select all
<b>procedure</b> TForm1.btnXRefSearchPathClick(Sender: TObject);
<b>var</b>
vImg: TsgDXFImage;
vBlock: TsgDXFBlock;
I: Integer;
<b>begin</b>
vImg := TsgDXFImage(sgPaintBox.picture.Graphic);
vImg.Converter.XRefSearchPath := <font color="blue">'c:\XRefSearchPath\'</font id="blue">;
<b>for</b> I := <font color="blue">0</font id="blue"> <b>to</b> vImg.Converter.Sections[csBlocks].Count -<font color="blue">1</font id="blue"> <b>do
begin</b>
vBlock := TsgDXFBlock(vImg.Converter.Sections[csBlocks].Entities[I]);
<b>if</b> vBlock.XrefPath <> '' <b>then
begin</b>
vBlock.IsLoaded := false;
vImg.Converter.Loads(vBlock);
<b>end</b>;
<b>end</b>;
vImg.GetExtents;
sgPaintBox.Invalidate;
<b>end</b>;
Please post questions to the forum or write to support@cadsofttools.com