Prod.: Engine, ver.: 6019, ID: 60001371, Wish : ActionDrawFigure export to Wrapper ActiveX

Wish : ActionDrawFigure export to Wrapper ActiveX

Article60001371
TypeWish
ProductEngine
Version6019
Date Added4/4/2011
FixedYes [4/4/2011]
Submitted byshlee
Keywords

Subject

ActionDrawFigure export to Wrapper ActiveX

Summary

Is it possible to export ActionDrawFigure(fig) in the Wrapper ActiveX ?

Solution

It is available in 6020. Can be used like :
void CVdView::Test() // Type "test" to command line to try some test functionality
{
	VectorDraw_Professional::IvdDocumentPtr doc = m_Vdraw.GetActiveDocument().GetWrapperObject(); // You need the VectorDraw_Professional.TLB in your project

	VectorDraw_Professional::IvdPointPtr vpt(__uuidof(VectorDraw_Professional::vdPoint));
	VectorDraw_Professional::IvdBaseObjectPtr baseobj =    (VectorDraw_Professional::IvdBaseObjectPtr)vpt;
	baseobj->SetUnRegisterDocument(doc);
	VectorDraw_Professional::IvdPrimaryPtr primary = (VectorDraw_Professional::IvdPrimaryPtr)vpt;
	primary->setDocumentDefaults();
	VectorDraw_Geometry::IgPointPtr geo_pt(__uuidof(VectorDraw_Geometry::gPoint));
	geo_pt->SetValue(1.0, 1.0, 3.0);
	vpt->PutRefInsertionPoint(geo_pt);

	VectorDraw_Professional::IvdFigurePtr fig =  (VectorDraw_Professional::IvdFigurePtr)vpt;
	doc->GetActiveLayOut()->entities->AddItem(fig);
	doc->ActionDrawFigure(fig);
}