setting a TsgExpDXFLayer to off for default view
Moderators: SDS, support, admin
setting a TsgExpDXFLayer to off for default view
I am creating five layers in a DXF file which I am exporting from Delphi application. This VCL component is doing the job in an exceelent manner and infact the DXF produced this way is being recognized as of higher quality then the normal ones produced by even good and experienced Draftsmen using AutoCAD.
But now I need two more functionality and perhaps I am not able to find the matching option in the Help or in demo file. so I am back here asking for your help.
I need to set the Z order of layers (not just entities) so that the layers are drawn layers are drawn over each other in a pre determined order only.
Secondly, I need to set the visibility of one layer to off (for default viewing) though if user wishes he may make it on in AutoCAD.
Please help
Thanking you in anticipation
Sunil K Arora
digitiger
But now I need two more functionality and perhaps I am not able to find the matching option in the Help or in demo file. so I am back here asking for your help.
I need to set the Z order of layers (not just entities) so that the layers are drawn layers are drawn over each other in a pre determined order only.
Secondly, I need to set the visibility of one layer to off (for default viewing) though if user wishes he may make it on in AutoCAD.
Please help
Thanking you in anticipation
Sunil K Arora
digitiger
Hello,
<blockquote id="quote"><font size="2" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">I need to set the Z order of layers (not just entities) so that the layers are drawn layers are drawn over each other in a pre determined order only.<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
Official documentation of AutoCAD sais nothing about such possibility. There is another way to change places of layers.
<b>Converter.Counts[csLayers]</b> returns number of layers in the file.
<b>Converter.Sections[csLayers].Entities</b> gives access to the layers.
It is necessary to get all layers, to clear list <b>Converter.Sections[csLayers].Entities</b> and fill it again in the correct order.
<blockquote id="quote"><font size="2" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">Secondly, I need to set the visibility of one layer to off (for default viewing) though if user wishes he may make it on in AutoCAD.<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
Just set TsgDXFLayer.Frozen to True/False.
Sergey.
please post questions to the forum or write to support@cadsofttools.com
<blockquote id="quote"><font size="2" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">I need to set the Z order of layers (not just entities) so that the layers are drawn layers are drawn over each other in a pre determined order only.<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
Official documentation of AutoCAD sais nothing about such possibility. There is another way to change places of layers.
<b>Converter.Counts[csLayers]</b> returns number of layers in the file.
<b>Converter.Sections[csLayers].Entities</b> gives access to the layers.
It is necessary to get all layers, to clear list <b>Converter.Sections[csLayers].Entities</b> and fill it again in the correct order.
<blockquote id="quote"><font size="2" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">Secondly, I need to set the visibility of one layer to off (for default viewing) though if user wishes he may make it on in AutoCAD.<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
Just set TsgDXFLayer.Frozen to True/False.
Sergey.
please post questions to the forum or write to support@cadsofttools.com
Hello,
Please try the following code:
Sergey.
please post questions to the forum or write to support@cadsofttools.com
Please try the following code:
Code: Select all
<b>procedure</b> TForm1.DXFExportTestForum256Click(Sender: TObject);
<b>var</b>
vDXF: TsgDXFExport;
Data: TdxfExportData;
vLayer: TsgExpDXFLayer;
<b>begin</b>
vDXF := TsgDXFExport.Create;
<b>try</b>
// Rectangle POLYLINE
vLayer := TsgExpDXFLayer.Create('Hatch');
vDXF.CurrentLayer := vLayer;
vLayer.Flags := 1;
FillChar(Data, SizeOf(Data), 0);
Data.Color := ColorToDXF(clYellow);
Data.Point.X := 80;
Data.Point.Y := 10;
Data.Point1.X := 120;
Data.Point1.Y := 30;
vDXF.AddRectangle(Data);
vDXF.SaveToFile('D:\222.dxf');
<b>finally</b>
vDXF.Free;
<b>end</b>;
<b>end</b>;
please post questions to the forum or write to support@cadsofttools.com