Prod.: Engine, ver.: 6009, ID: 60000283, Wish : The object Grip_SelectedObject to be a "Wrapper" object and not a VDF .NET object

Wish : The object Grip_SelectedObject to be a "Wrapper" object and not a VDF .NET object

Article60000283
TypeWish
ProductEngine
Version6009
Date Added10/26/2007
FixedYes [10/27/2007]
Submitted byHartmut Becker
Keywords

Subject

The object Grip_SelectedObject to be a "Wrapper" object and not a VDF .NET object

Summary

The object Grip_SelectedObject in wrapper, to be a "Wrapper" object and not a VDF .NET object

Solution

In 6010 the Grid_SelectedObject property of vdraw control return a VdrawI5 wrapper type(VdrawI5.vdObject)

example in C++ 6:

 

//open a new document and adds the Selection of all entities of the ActiveLayout in the PropertyGrid

 m_vd.GetActiveDocument().Open("",0,0);
 CvdSelection set = m_vd.GetActiveDocument().GetSelections().Add("test");
 set.Select(COleVariant("all"),COleVariant(),COleVariant());
 m_vd.SetGrid_SelectedObject(set);

 

//Get the selected Interface of Property Grid as VdrawI5.vdObject interface.
 LPDISPATCH disp = m_vd.GetGrid_SelectedObject();
 
 //test if the ObjectType is vdselection and display the selection name

//when the Selected object of property grid is a Selection then a temporary selection of VdrawI5.vdselection is return.

//The selection contains all the entities of the previous created selection with name "test".
 CvdObject obj =disp;
 if(obj.GetObjectType() == "VDSELECTION")

{
 CvdSelection set2 = disp;
 MessageBox(set2.GetName());

}