Community
I use AcGsView, AcGsModel and AcGsDevice to draw a in a "preview" window, like in the BlockView sample.
It works well but linetypes and lineweights are not displayed.
Somebody can help me ?
Thanks...
The following function works for the linetypes problem, i call it when an drawing was created or opend.
The preview window then uses the LTSCALE from the current drawing.
void changeVisualStyle() { AcDbDatabase* pDb = acdbHostApplicationServices()->workingDatabase(); AcDbViewportTable* pVportTable = NULL; if (pDb->getViewportTable(pVportTable, AcDb::kForRead) != Acad::eOk) { return; } AcDbViewportTableRecord *pVportTableRec = NULL; if (pVportTable->getAt(ACRX_T("*Active"), pVportTableRec, AcDb::kForWrite) != Acad::eOk) { pVportTable->close(); return; } AcDbDictionary *pStyleDict; if (acdbOpenObject(pStyleDict, pDb->visualStyleDictionaryId(), AcDb::kForRead) == Acad::eOk) { AcDbObjectId vsId = AcDbObjectId::kNull; pStyleDict->getAt(ACRX_T("Realistic"), vsId); pVportTableRec->setVisualStyle(vsId); pStyleDict->close(); } pVportTableRec->close(); pVportTable->close(); acedVportTableRecords2Vports(); }
I have the same problem as you. I haven't solved it.
Linetype cannot be displayed in preview interface.
Can't find what you're looking for? Ask the community or share your knowledge.