If I create a line it comes in the default layer.
Dim xLine As New CADLine
xLine.Point = New DPoint(10, 10, 0)
xLine.Point1 = New DPoint(20, 20, 0)
xLine.Color = Color.Red
xLine.LineWeight = Convert.ToSingle(0.5)
cadImageFld.Converter.GetSection(ConvSection.Entities).AddEntity(xLine)
cadImageFld.Converter.OnCreate(xLine)
cadImageFld.Converter.Loads(xLine)
I also create a second layer:
Dim entLayer As New CADLayer()
entLayer.Name = "MyLayer"
entLayer.Visibility = True
entLayer.Loaded(Me.cadImageFld.Converter)
Me.cadImageFld.Converter.Layers.Add(entLayer)
Me.cadImageFld.Converter.OnCreate(entLayer)
Me.AddRecordToLayerList("MyLayer", Color.Blue, True, False)
I can see now in the LayerForm this new Layer, but I do not know how to create an Entity (for example Line) in this new layer.
Regards.
Create Entity in runtime Layers
Moderators: SDS, support, admin
Re: Create Entity in runtime Layers
Hello,
It's possible to set a layer for newly created entity using CADEntity.Layer property.
Mikhail.
It's possible to set a layer for newly created entity using CADEntity.Layer property.
Mikhail.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support