ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AcGsView and linetypes

2 REPLIES 2
Reply
Message 1 of 3
2011301610406
612 Views, 2 Replies

AcGsView and linetypes

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...

2 REPLIES 2
Message 2 of 3

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();
}

 

Message 3 of 3
Anonymous
in reply to: BerndCuder8196

I have the same problem as you. I haven't solved it.

Linetype cannot be displayed in preview interface.

 

1.png

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


AutoCAD Beta