Article | 60000283 |
Type | Wish |
Product | Engine |
Version | 6009 |
Date Added | 10/26/2007 12:00:00 AM |
Fixed | (10/27/2007 12:00:00 AM) |
Submitted by | Hartmut Becker |
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());
}