Message 1 of 4
Not applicable
09-14-2017
01:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hi, community.
I'm trying to change viewport's visual style, but it doesn't, visual style label in layout winodw change, but make no change in entities.
static void func(AcDbViewport* pViewport, const AcGePoint3d& modelCenter)
{
if (pViewport == nullptr)
{
ASSERT(pViewport != nullptr);
return;
}
acedSetCurrentVPort(pViewport);
acedMspace();
AcDbObjectId vsId = AcDbObjectId::kNull;
AcDbDictionaryPointer pNOD(acdbHostApplicationServices()->workingDatabase()->visualStyleDictionaryId(), AcDb::kForRead);
pNOD->getAt(ACRX_T("Conceptual"), vsId);
pViewport->setVisualStyle(vsId);
//acedCommand(RTSTR, _T("_vscurrent"), RTSTR, _T("_c"), 0);
acedCommand(RTSTR, _T("-view"), RTSTR, _T("_swiso"), 0);
pViewport->setViewTarget(modelCenter);
pViewport->updateDisplay();
pViewport->syncModelView();
}the entities in the viewport is still 2D wireframe, which is default, make no change.
Any wrong with my code?
pls help
thx!
Solved! Go to Solution.