Update Viewport after enabling an VisibilityOverrule

Update Viewport after enabling an VisibilityOverrule

fehrsZBFB9
Advocate Advocate
1,067 Views
3 Replies
Message 1 of 4

Update Viewport after enabling an VisibilityOverrule

fehrsZBFB9
Advocate
Advocate

Hi Folks,

I have implemented an VisibilityOverrule which temporarily hides all entities of a drawing.

After it is enabled I us a jig class to interact with the user inside the cleared drawing. For all visual styles except wireframe2d, the entities are not hidden automatically. I have to refesh the viewport. The only way I found so far is to call the undocumented function acedColorSettingsChanged. After it is called. All entities are gone.  I tried different ways to achieve the same result but without success.

 

I tried:

acedCommandS(RTSTR, L"REGEN", RTNONE)

acedCommandS(RTSTR, L"REGENALL", RTNONE)

acedUpdateDisplay

acedUpdate

AcGsView::invalidate()

AcGsView::update()

 

What else could it be? Any ideas?

 

Thanks,

Martin

0 Likes
Accepted solutions (1)
1,068 Views
3 Replies
Replies (3)
Message 2 of 4

Alexander.Rivilis
Mentor
Mentor
Accepted solution

Try:

acedCommandS(RTSTR, L"REGEN3", RTNONE);

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 3 of 4

fehrsZBFB9
Advocate
Advocate

It works so far. Sadly it does not regenerate the hidden entities for wireframe2d after the overrule gets disabled. They are still hidden afterwards. For wireframe2d I have to use REGEN instead.

 

Which is the fastest/simplest way to detect if wireframe2d is active?

0 Likes
Message 4 of 4

Alexander.Rivilis
Mentor
Mentor
AcDbObjectPointer<AcDbVisualStyle> pVstyle(acdbGetViewportVisualStyle(), AcDb::kForRead);
if (pVstyle.openStatus() == Acad::eOk)
{
    acutPrintf(L"\nVisual Style is %s WireFrame 2D", 
      (pVstyle->type() != AcGiVisualStyle::k2DWireframe) ? L"NOT" : L"");
}

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member