how to disable / close RevealHiddenMode

how to disable / close RevealHiddenMode

Ning_Zhou
Advocate Advocate
919 Views
4 Replies
Message 1 of 5

how to disable / close RevealHiddenMode

Ning_Zhou
Advocate
Advocate

there's EnableRevealHiddenMode function, but no corresponding DisableRevealHiddenMode or CloseRevealHiddenMode, did i miss something here or just too much coffee today?

 

the reason i use it is to force "refresh" view because RefreshActiveView doesn't work after i use HideElements function to hide some pipes/ducts and unselectable single lines remains in that view.

 

i managed to get around by using DetailLevel instead, but i still want to know the reasons?

0 Likes
Accepted solutions (1)
920 Views
4 Replies
Replies (4)
Message 2 of 5

arnostlobel
Alumni
Alumni
Accepted solution

I admit it is definitelly rather confusing an API, the one about temporary view modes. Indeed there is no disabeRevealHIddenMode, as there is no "disable" method for almost any other temporary view mode either, save o few. Instead, there is this generic method that can be used to disable any such a mode: View.DisableTemporaryViewMode. Please refer to the API documentation for mode details if needed.

Arnošt Löbel
0 Likes
Message 3 of 5

Ning_Zhou
Advocate
Advocate
ok, so DisableTemporaryViewMode will apply to both "Temporary Hide/Isolate" mode and "Reveal Hidden Elements" mode, i'll give a try later, thanks Arnost!

as mentioned in my previous msg, any reason why (in 3d view)
1) RefreshActiveView doesn't work, and
2) after i use HideElements function to hide some pipes/ducts and unselectable single lines remains in that view
0 Likes
Message 4 of 5

arnostlobel
Alumni
Alumni

Ning,

 

As far as I know there is not special “treatment” for 3D views during refreshing a view. It ought to work as for any other type of view. That being said, it needs to be also stated that calling RefreshActiveView does not always guarantee that everything would be refreshed, although it is usually the case. In some situations the program needs to get back to Revit control before a complete refresh can be done.

 

Also, I assume that you call Refresh only after you submitted your transaction. Is that correct?

Arnošt Löbel
0 Likes
Message 5 of 5

Ning_Zhou
Advocate
Advocate
View.DisableTemporaryViewMode works great, thanks Arnost.

yes, i called Refresh after transaction, well, i won't bother this and another VG issue anymore, sometimes view needs refreshed even recreated in normal UI.
0 Likes