Set LineType appearance thru DRX

How do I set up the lineType appearance so that shows up in the lineType pull down?Thanks.My codeint anewLineType(){ OdApDocManager pDocMan = odapDocManager(); OdApDocument pDoc = pDocMan->curDocument(); OdDbDatabasePtr pDb = pDoc->database(); OdDbTextStyleTablePtr pTextStyleTable = pDb->getTextStyleTableId().safeOpenObject(); OdDbLinetypeTablePtr pLinetypeTable = pDb->getLinetypeTableId().safeOpenObject(OdDb::kForWrite); OdDbLinetypeTableRecordPtr pLinetypeTableRecord = OdDbLinetypeTableRecord::createObject(); pLinetypeTableRecord->setName( OdString("MyLine") ); pLinetypeTableRecord->setComments( OdString("-DM-") ); pLinetypeTableRecord->setPatternLength(0.1); pLinetypeTableRecord->setNumDashes(3); pLinetypeTableRecord->setDashLengthAt(0, 0.5); pLinetypeTableRecord->setDashLengthAt(1, -0.3); pLinetypeTableRecord->setShapeStyleAt(1, pTextStyleTable->getAt( OdString("Standard") )); pLinetypeTableRecord->setShapeNumberAt(1, 0); pLinetypeTableRecord->setShapeOffsetAt(1, OdGeVector2d(-0.1,-0.05)); pLinetypeTableRecord->setShapeScaleAt(1, 0.1); pLinetypeTableRecord->setShapeIsUcsOrientedAt(1, false); pLinetypeTableRecord->setShapeRotationAt(1, 0); pLinetypeTableRecord->setTextAt(1, OdString("DM") ); pLinetypeTableRecord->setDashLengthAt(2, -0.3); OdDbObjectId ltId(pLinetypeTable->add(pLinetypeTableRecord)); return (RTNORM);}

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Click one of the buttons on the top bar to get involved!