Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

AcDbVisibilityOverrule

olivier.berrier
Contributor

AcDbVisibilityOverrule

olivier.berrier
Contributor
Contributor

Hello,

I use AcDbVisibilityOverrule to display or hide entities in model space according to a specific test.

I split the model space in multiple views (Top + 3D Isometric).

The overrule modifies only the current view, not all views in the model space.

What can I do to display (or hide) the entites in the same way in all views of the model space ?

Should I have to instantiate a overrule for each viewport in the model space ?

Thank you

Olivier BERRIER
www.geo-media.com
0 Likes
Reply
267 Views
3 Replies
Replies (3)

tbrammer
Advisor
Advisor

AcDbVisibilityOverrule has no means to set view specific visibility.

I'm begging for a viewport-dependent visibility in AutoCAD since years. But there are still only these possibilities:

  • Layer visibility in paperspace viewports (doesn't work for modelspace views)
  • Clipping (frontClipDistance() / backClipDistance())
  • "Routing" worldDraw() to viewportDraw() which is complicated, unstable and hard to maintain to my experience. See some approaches here and here.

 

 

 


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

0 Likes

olivier.berrier
Contributor
Contributor

Thank you tbrammer,

but I don't want to have a specific display per view. Rather I want the same display in each view when the overrule is active.

 

I managed to do it : for each view of the model space, i set it active and then I create a AcDbVisibilityOverrule.

 

But another problem occurs : if the view is in Conceptual or Realistic mode, the display isn't updated .

Olivier BERRIER
www.geo-media.com

tbrammer
Advisor
Advisor

@olivier.berrier wrote:

but I don't want to have a specific display per view. Rather I want the same display in each view when the overrule is active.

I understood that. The only solution to this problem I found until now is to use to draw the world geometry with viewportDraw() into every view(port).

 


I managed to do it : for each view of the model space, i set it active and then I create a AcDbVisibilityOverrule.

This is interesting! Can you explain how you toggle the overrule activation? Which reactor(s) do you use?

Does your approach also work when you open a DWG that was saved with special visibilities per view?

 


But another problem occurs : if the view is in Conceptual or Realistic mode, the display isn't updated .


So it only works for the "2D wireframe" shademode? Or also for "3D wireframe"/"hidden line"...?

 


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

0 Likes