Prod.: Engine, ver.: 6, ID: 60000368, HowTo : How can i filter select ALL polylines of ALL layers of a specific layout of a document

HowTo : How can i filter select ALL polylines of ALL layers of a specific layout of a document

Article60000368
TypeHowTo
ProductEngine
Version6
Date Added1/3/2008
Submitted byPeter chanios
Keywords

Subject

How can i filter select ALL polylines of ALL layers of a specific layout of a document

Summary

How can i filter select ALL polylines of ALL layers of a specific layout of a document.

Solution

//Create a selection
VectorDraw.Professional.vdCollections.vdSelection selset = new vdSelection("Myselset");
selset.SetUnRegisterDocument(vdFramedControl1.BaseControl.ActiveDocument);

//Create a filter
VectorDraw.Professional.vdObjects.vdFilterObject filter = new vdFilterObject();

//Add ALL Layer names to the filter(you can add simply 1 layer if you want
foreach (vdLayer var in vdFramedControl1.BaseControl.ActiveDocument.Layers)
{
filter.Layers.AddItem(var.Name);
}

//Add vdPolyline to select all polylines
filter.Types.AddItem("vdPolyline");

//Add the name of the layout you want to check if no name is specified then ALL layouts will be checked
filter.LayOuts.AddItem(vdFramedControl1.BaseControl.ActiveDocument.ActiveLayOut.Name);

//Apply the filter. After this the selection will contain the selected polylines.
selset.FilterSelect(filter);