70000201 I would like to use the VectorDraw combos to select objects without interfering with the Document

Article 70000201
Type Wish
Product Engine
Version 7002
Date Added 12/9/2014
Fixed (12/10/2014)
Submitted by müller tamás

Summary

I would like to use the VectorDraw combos to select objects without interfering with the Document (vdLinetypeCombo,vdLayersCombo,vdLineWeightCombo,vdColorCombo)

Solution

In version 7003 we made the following changes to the vdLinetypeCombo,vdLayersCombo,vdLineWeightCombo,vdColorCombo

For the vdColorCombo

summary> Use this property to pass a vdColor object to be modified without interfering with the Document.
public vdColor UserColor

This property can be used like below
vdColorCombo1.ColorDocument = vdDocumentComponent1.Document;
vdColorCombo1.UserColor = new VectorDraw.Professional.vdObjects.vdColor(Color.Red);
vdColorCombo1.ColorSelected += new vdColorComboBox.vdColorCombo.ColorSelectedEventHandler(vdColorCombo1_ColorSelected);

void vdColorCombo1_ColorSelected(object sender)
{
vdColorComboBox.vdColorCombo combo = sender as vdColorComboBox.vdColorCombo;
VectorDraw.Professional.vdObjects.vdColor col = combo.UserColor;
}

for the vdLinetypeCombo

summary>Use this property to pass a vdLinetype object to be modified without interfering with the Document.
public VectorDraw.Professional.vdPrimaries.vdLineType UserLinetype

This property can be used like below
vdLinetypeCombo1.LinetypesDocument = vdDocumentComponent1.Document;
vdLinetypeCombo1.UserLinetype = vdDocumentComponent1.Document.LineTypes.FindName("DOT");
vdLinetypeCombo1.LinetypeSelected += new vdLinetypeComboBox.vdLinetypeCombo.LinetypeSelectedEventHandler(vdLinetypeCombo1_LinetypeSelected);

void vdLinetypeCombo1_LinetypeSelected(object sender)
{
vdLinetypeComboBox.vdLinetypeCombo combo = sender as vdLinetypeComboBox.vdLinetypeCombo;
VectorDraw.Professional.vdPrimaries.vdLineType lType = combo.UserLinetype;
}
For the vdLayersCombo
summary> Use this property to pass a vdLayer object to be modified without interfering with the Document.
public VectorDraw.Professional.vdPrimaries.vdLayer UserLayer

This property can be used like below
vdLayersCombo1.LayersDocument = vdDocumentComponent1.Document;
vdDocumentComponent1.Document.Layers.Add("test");
vdDocumentComponent1.Document.Layers.Add("test1");
vdLayersCombo1.UserLayer = vdDocumentComponent1.Document.Layers.FindName("test");
vdLayersCombo1.LayerSelected += new vdLayersComboBox.vdLayersCombo.LayerSelectedEventHandler(vdLayersCombo1_LayerSelected);

void vdLayersCombo1_LayerSelected(object sender)
{
vdLayersComboBox.vdLayersCombo combo = sender as vdLayersComboBox.vdLayersCombo;
VectorDraw.Professional.vdPrimaries.vdLayer lay = combo.UserLayer;
}

For the vdLineWeightCombo

summary> Use this property to pass a LineWeight object to be modified without interfering with the Document.
remarks>Default value (VectorDraw.Professional.Constants.VdConstLineWeight)(-5).
public VectorDraw.Professional.Constants.VdConstLineWeight UserLineWeight

This property can be used like below
vdLineWeightCombo1.LineWeightDocument = vdDocumentComponent1.Document;
vdLineWeightCombo1.UserLineWeight = VectorDraw.Professional.Constants.VdConstLineWeight.LW_120;
vdLineWeightCombo1.LineWeightSelected += new vdLineWeightComboBox.vdLineWeightCombo.LineWeightEventHandler(vdLineWeightCombo1_LineWeightSelected);

void vdLineWeightCombo1_LineWeightSelected(object sender)
{
vdLineWeightComboBox.vdLineWeightCombo combo = sender as vdLineWeightComboBox.vdLineWeightCombo;
VectorDraw.Professional.Constants.VdConstLineWeight lweight = combo.UserLineWeight;
}

Send comments on this topic.