How to change the layer LineType
Moderators: SDS, support, admin
How to change the layer LineType
To change the Layer color i do
But to change the line type
Moreover where is the documentation about this property?
Thanks a lot.
Code: Select all
vDrawing.Converter.LayerByName('0').Color := clRed;
Code: Select all
vDrawing.Converter.LayerByName('0').LineType := WHAT?
Thanks a lot.
Re: How to change the layer LineType
Hello,
TsgDXFLinetype objects are stored in the LTYPES section, each line type has a unique name. So you can retrieve a line type by its name and apply it to the layer. For example:
TsgDXFLayer.LineType property is documented in CAD VCL help which is available online:
http://cadsofttools.com/help/cadvcl/tsg ... netype.htm
Mikhail
TsgDXFLinetype objects are stored in the LTYPES section, each line type has a unique name. So you can retrieve a line type by its name and apply it to the layer. For example:
Code: Select all
vDrawing.Converter.LayerByName('0').LineType := vDrawing.Converter.Sections[csLTypes].FindEntByName('ISO dash') as TsgDXFLineType;
http://cadsofttools.com/help/cadvcl/tsg ... netype.htm
Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: How to change the layer LineType
THanks for the reply.
I tried to use your code but i still create a continuous line.
I suspect this is because i need to call Loaded as described in the help.
PROBLEM 1
Please tell me how to use Loaded in this case:
PROBLEM 2
Where do i find the complete list of options ("ISO dash" is one and the others)?
Thanks
I tried to use your code but i still create a continuous line.
I suspect this is because i need to call Loaded as described in the help.
PROBLEM 1
Please tell me how to use Loaded in this case:
Code: Select all
var
vDrawing: TsgCADDXFImage;
begin
vDrawing := TsgCADDXFImage.Create;
vDrawing.LoadFromFile('../../TwoSimpleLayers.dxf');
// Changes color of Layer '0'
vDrawing.Converter.LayerByName('0').Color := clRed;
vDrawing.Converter.LayerByName('1').Color := clGreen;
vDrawing.Converter.LayerByName('1').LineType := vDrawing.Converter.Sections[csLTypes].FindEntByName('ISO dash') as TsgDXFLineType;;
Loaded; // <----- HOW TO?
Image1.Canvas.StretchDraw(Rect(0, 0,
Round(vDrawing.Width * Image1.Height / vDrawing.Height), Image1.Height), vDrawing);
vDrawing.Free;
Where do i find the complete list of options ("ISO dash" is one and the others)?
Thanks
Re: How to change the layer LineType
Hello,
You should call a TsgDXFConverter.Loads procedure which reloads a modified object (TsgDXFEntity or its derivatives) in the TsgDXFConverter. For the layer "1" the Loads call will be the following:
The linetypes list depends on a drawing file, you can see all the available linetypes in AutoCAD: open the drawing file and enter LINETYPE at the Command prompt, the Linetype Manager window will be displayed.
Mikhail
You should call a TsgDXFConverter.Loads procedure which reloads a modified object (TsgDXFEntity or its derivatives) in the TsgDXFConverter. For the layer "1" the Loads call will be the following:
Code: Select all
vDrawing.Converter.Loads(vDrawing.Converter.LayerByName('1'));
Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
-
- Posts: 1
- Joined: 17 Jan 2017, 11:03
- Location: USA
Re: How to change the layer LineType
Thanks Mikhail,support wrote:Hello,
You should call a TsgDXFConverter.Loads procedure which reloads a modified object (TsgDXFEntity or its derivatives) in the TsgDXFConverter. reviews of phenq For the layer "1" the Loads call will be the following:
The linetypes list depends on a drawing file, you can see all the available linetypes in AutoCAD: open the drawing file and enter LINETYPE at the Command prompt, the Linetype Manager window will be displayed.Code: Select all
vDrawing.Converter.Loads(vDrawing.Converter.LayerByName('1'));
Mikhail
-
- Posts: 1
- Joined: 12 Aug 2017, 11:58
Re: How to change the layer LineType
It works good, Thanks MikhailBrooklyn19 wrote:support wrote:Hello,
You should call a TsgDXFConverter.Loads procedure which reloads a modified object (TsgDXFEntity or its derivatives) in the TsgDXFConverter. Reviews of phen375 For the layer "1" the Loads call will be the following:
The linetypes list depends on a drawing file, you can see all the available linetypes in AutoCAD: open the drawing file and enter LINETYPE at the Command prompt, the Linetype Manager window will be displayed.Code: Select all
vDrawing.Converter.Loads(vDrawing.Converter.LayerByName('1'));
Mikhail