API -3D -> 2 -> |
KompasObjectPtr kompas;
//
kompas.CreateInstance(L"KOMPAS.Application.5");
//
DocumentParamPtr DocumentParam;
DocumentParam=(DocumentParamPtr)kompas->GetParamStruct(ko_DocumentParam);
DocumentParam->Init();
DocumentParam->type= lt_DocSheetStandart;//
SheetParPtr SheetPar;
SheetPar = (SheetParPtr)DocumentParam->GetLayoutParam();
SheetPar->layoutName[0] = L'0';
SheetPar->shtType = 1; //
//
StandartSheetPtr StandartSheet;
StandartSheet = (StandartSheetPtr)SheetPar->GetSheetParam();
StandartSheet->direct = false; //
StandartSheet->format = 4; //4
StandartSheet->multiply = 1; //
//
Document2DPtr Document2D;
Document2D = (Document2DPtr)kompas->Document2D();
Document2D->ksCreateDocument(DocumentParam);
//
kompas->Visible = true;
kompas.Unbind();
KompasObjectPtr kompas;
//
kompas.CreateInstance(L"KOMPAS.Application.5");
//
DocumentParamPtr DocumentParam;
DocumentParam=(DocumentParamPtr)kompas->GetParamStruct(ko_DocumentParam);
DocumentParam->Init();
DocumentParam->type = lt_DocSheetUser; //
SheetParPtr SheetPar;
SheetPar = (SheetParPtr)DocumentParam->GetLayoutParam();
SheetPar->layoutName[0] = L'0';
SheetPar->shtType = 1; //
//
SheetSizePtr SheetSize;
SheetSize = (SheetSizePtr)SheetPar->GetSheetParam();
SheetSize->Init();
SheetSize->width = 300;
SheetSize->height = 300;
//
Document2DPtr Document2D;
Document2D = (Document2DPtr)kompas->Document2D();
Document2D->ksCreateDocument(DocumentParam);
//
kompas->Visible = true;
kompas.Unbind();