- 积分
- 591
- 明经币
- 个
- 注册时间
- 2002-6-13
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2002-8-15 08:52:00
|
显示全部楼层
参考一下
void TUFUDLG::CreatLineType() { //创建线型
AcDbLinetypeTable *pLinetypeTable;//线型
AcDbObjectId ltId;
acdbHostApplicationServices()->workingDatabase()
->getSymbolTable(pLinetypeTable,AcDb::kForWrite);
AcDbLinetypeTableRecord *pLinetypeTableRec=new AcDbLinetypeTableRecord;
pLinetypeTableRec->setName("中心线");
pLinetypeTableRec->setAsciiDescription("中心线____ _ ____");
pLinetypeTableRec->setNumDashes(4);
pLinetypeTableRec->setDashLengthAt(0,1.25);
pLinetypeTableRec->setDashLengthAt(1,-0.25);
pLinetypeTableRec->setDashLengthAt(2,0.25);
pLinetypeTableRec->setDashLengthAt(3,-0.25);
pLinetypeTableRec->setIsScaledToFit(0);
pLinetypeTableRec->setPatternLength(2);
pLinetypeTable->add(pLinetypeTableRec);
pLinetypeTableRec->close();
AcDbLinetypeTableRecord *pLinetypeTableRec1=new AcDbLinetypeTableRecord;
pLinetypeTableRec1->setName("虚线");
pLinetypeTableRec1->setAsciiDescription("虚线__ __ __");
pLinetypeTableRec1->setNumDashes(2);
pLinetypeTableRec1->setDashLengthAt(0,0.5);
pLinetypeTableRec1->setDashLengthAt(1,-0.25);
pLinetypeTableRec1->setIsScaledToFit(0);
pLinetypeTableRec1->setPatternLength(0.75);
pLinetypeTable->add(pLinetypeTableRec1);
pLinetypeTableRec1->close();
AcDbLinetypeTableRecord *pLinetypeTableRec2=new AcDbLinetypeTableRecord;
pLinetypeTableRec2->setName("双点划线");
pLinetypeTableRec2->setAsciiDescription("双点划线____ _ _ ____");
pLinetypeTableRec2->setNumDashes(6);
pLinetypeTableRec2->setDashLengthAt(0,1.25);
pLinetypeTableRec2->setDashLengthAt(1,-0.25);
pLinetypeTableRec2->setDashLengthAt(2,0.25);
pLinetypeTableRec2->setDashLengthAt(3,-0.25);
pLinetypeTableRec2->setDashLengthAt(4,0.25);
pLinetypeTableRec2->setDashLengthAt(5,-0.25);
pLinetypeTableRec2->setIsScaledToFit(0);
pLinetypeTableRec2->setPatternLength(2.5);
pLinetypeTable->add(pLinetypeTableRec2);
pLinetypeTableRec2->close();
pLinetypeTable->close();
} |
|