arraray function

arraray function

Anonymous
Not applicable
184 Views
0 Replies
Message 1 of 1

arraray function

Anonymous
Not applicable
I would like to make an array that would input this information.


AcDbLayerTable *pLayerTbl;

acdbHostApplicationServices()->workingDatabase()

->getSymbolTable(pLayerTbl, AcDb::kForWrite);

if (!pLayerTbl->has("cde-code-clerance")) {

AcDbLayerTableRecord *pLayerTblRcd

= new AcDbLayerTableRecord;

pLayerTblRcd->setName("cde-code-clerance");

pLayerTblRcd->setIsFrozen(0);// layer to THAWED

pLayerTblRcd->setIsOff(0); // layer to ON

pLayerTblRcd->setVPDFLT(0); // viewport default

pLayerTblRcd->setIsLocked(0);// un-locked

pLayerTblRcd->setIsPlottable(0); //layer not to be plotted


AcCmColor color;

color.setColorIndex(241); // set colorte

pLayerTblRcd->setColor(color);


// For linetype, we need to provide the object ID of

// the linetype record for the linetype we want to

// use. First, we need to get the object ID.

//

AcDbLinetypeTable *pLinetypeTbl;

AcDbObjectId ltId;

acdbHostApplicationServices()->workingDatabase()

->getSymbolTable(pLinetypeTbl, AcDb::kForRead);

if ((pLinetypeTbl->getAt("CONTINUOUS", ltId))

!= Acad::eOk)

{

acutPrintf("\nUnable to find CONTINUOUS"

" linetype. Using CONTINUOUS");



// CONTINUOUS is in every drawing, so use it.

//

pLinetypeTbl->getAt("CONTINUOUS", ltId);

}

pLinetypeTbl->close();


pLayerTblRcd->setLinetypeObjectId(ltId);

pLayerTbl->add(pLayerTblRcd);

pLayerTblRcd->close();

pLayerTbl->close();

} else {

pLayerTbl->close();

acutPrintf("\nlayer already exists");

}
0 Likes
185 Views
0 Replies
Replies (0)