Article | 60001371 |
Type | Wish |
Product | Engine |
Version | 6019 |
Date Added | 4/4/2011 |
Fixed | Yes [4/4/2011] |
Submitted by | shlee |
Keywords |
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); }