// The drawing factory is implemented ont the drawing container
CATIDrwFactory_var spDrwFact = spDrawingCont;
// We do create a view with Make Up
CATIDftViewMakeUp *piNewViewMU = NULL;
spDrwFact->CreateViewWithMakeUp(IID_CATIDftViewMakeUp, (void **)&piNewViewMU);
// Get the view from the MakeUp
CATIView *piNewView = NULL;
piNewViewMU->GetView(&piNewView);
CATFrmEditor *pCurrFrmEditor = poEditor->GetEditor();
CATPathElement oUIActPathElem = pCurrFrmEditor->GetUIActiveObject();
CATBaseUnknown* pCurrElemBase = oUIActPathElem.CurrentElement();
CATILinkableObject_var spLink(pCurrElemBase);
if(NULL_var==spLink)
{
cout <<"spLink is NULL!"<<endl;
}
piNewView->SetDoc(spLink);
// The view has to be typed: FrontView for Interactive view.
piNewView->SetViewType(FrontView);