CATIADrawingTables_var spDrawingTables=DrawingView;
if (NULL_var == spDrawingTables)
{
return ;
}
double PointX = m_Position.GetX();
double PointY = m_Position.GetY();//获取鼠标点的坐标
CATIADrawingTable *pTable=NULL;
spDrawingTables->Add(PointX, PointY, LineCount+3, m_ParmList.Size()+2, 0,0, pTable);//
pTable->MergeCells(1,1,1,m_ParmList.Size()+2);//
pTable->MergeCells(LineCount+3,1,1,m_ParmList.Size()+2);//
//设置表格单位显示
CATIDrwTextProperties_var pTextProp = pTable;
if (_CheckButton008->GetState() == CATDlgUncheck)
{
pTextProp->SetUnitDisplayMode(CATDrwUnitDisplayNone);
}
if (_CheckButton008->GetState() == CATDlgCheck)
{
pTextProp->SetUnitDisplayMode(CATDrwUnitDisplayAll);
}
CATIDrwTextProperties_var DrwProp= pTable;
if (NULL_var == DrwProp)
{
return;
}
DrwProp->SetJustification(CATDrwCenter);//设置表格格式属性,设置表格内容居中
//为固定表格位置设置固定文本
CATUnicodeString PtParmTableStr = "Name";
CATBSTR PtParmTableBStr;
PtParmTableStr.ConvertToBSTR(&PtParmTableBStr);
pTable->SetCellString(1, 1, PtParmTableBStr);
CATUnicodeString PitchTypeStr = "Year";
CATBSTR PitchTypeBStr;
PitchTypeStr.ConvertToBSTR(&PitchTypeBStr);
pTable->SetCellString(2, 1, PitchTypeBStr);
CATUnicodeString PitchLengthStr = "Day";
CATBSTR PitchLengthBStr;
PitchLengthStr.ConvertToBSTR(&PitchLengthBStr);
pTable->SetCellString(3, 1, PitchLengthBStr);