Article | 60001681 |
Type | HowTo |
Product | Engine |
Version | 6 |
Date Added | 4/25/2012 |
Submitted by | Samir Raorane |
Keywords |
private void MyButton_Click(object sender, EventArgs e) { vdDocument Doc = vdFramedControl1.BaseControl.ActiveDocument; Doc.New(); Doc.Open(@"C:\test\grip.vdml"); // a drawing that contains such a block / insert is opened Doc.OnGetGripPoints += new vdDocument.GetGripPointsEventHandler(Doc_OnGetGripPoints); Doc.GripBlock = vdDocument.VdConstGripBlock.GripALLENTITIES; } void Doc_OnGetGripPoints(object sender, gPoints gripPoints, ref bool cancel) { vdMText txt = sender as vdMText; if (txt != null) { vdXProperty prop = txt.XProperties.FindName("AvoidGrips"); // this vdXproperty is added to the vdMtext that is inside the vdBlock if (prop.PropValue.ToString() == "True") { cancel = true; } } }