Hide all reference geometry (Blank Datums)

Not sure who created this macro but it is very useful. It will traverse a part tree and hide all reference geometry selected for the configuration or all configurations (if linked to Display States).

Some potential enhancement ideas if there are any takers:

  • Ability to unhide
  • Support Display States not linked to configurations
  • Separate toggle for base planes
  • Option to hide surfaces

image.png
BlankDatums.swp (176 KB)

I’ll take a look at it to see if those are relatively easily added. Will report back.

Okay, I got it working… I think. I’m not sure if running it from an assembly really works the way it should so test that out to see if it works the way you want, if you use it at all.

The rest appears to work relatively well in my testing.

Edit: to show additional info
The base plane toggle assumes there are planes labeled Front Plane, Right Plane and Top Plane. If yours differ, these can be modified in the source code.
The “plane” toggle will not show or hide “base planes” and the “base plane” toggle won’t affect other planes.
I’ve added a surface selection that just grabs all surface bodies from the surfaces folder and hides/shows them.
The All Display states toggle will get any available display states for the current configuration and hide/show features within them as well.
image.png
I’m sure there’s a lot more optimization that can be done to speed things up but I don’t have the availability to dig into is on that level.

Edit2: Updated with different assembly functionality. The part needs to be opened to affect display states so this will now only happen when that is checked.
image.png

jcapriotti , I updated the file in my previous post with one that seems to work better on assemblies as well.

For read-only files, any changes will be skipped (this assumes these files are checked-in and cannot be changed anyway). There is a prompt that asks for permission to open then close files to affect the inactive display states if that check box is selected.

Awesome, I’ll try it out here shortly.

Nice macro, it seems more customizable then the one I currently use, will definetly give it a try!

Thanks AlexB for the little adds you did and thanks jcapriotti for the share!

I am getting this error, do you know why?
image.png

What does the error say?

Going with a guess, it could be that a component is lightweight or something unexpected. I’d have to do a bit of testing to figure that out.

image.png

Add this IF statement above the highlighted line in your error image.

If mCompModelDoc(swChildComp) Is Nothing Then
	swChildComp.SetSuppression2 swComponentSuppressionState_e.swComponentFullyResolved
End If

Still sometimes receiving an error on some assemblies, but i’m not sure why.
image.png
image.png