Assembly "Component Display" setting

Programming and macros
User avatar
loeb
Posts: 68
Joined: Sun Jan 16, 2022 5:55 pm
Answers: 1
x 39
x 10

Assembly "Component Display" setting

Unread post by loeb »

I am trying to write some VBA that sets the "Component Display" of the assemblies and parts in an assembly to "Default Display". I was hoping to find a method in IComponent2, but am having no luck. Any advice is appreciated.

Thank You,
image.png
User avatar
RonE
Posts: 32
Joined: Wed Nov 17, 2021 10:02 am
Answers: 4
Location: Germany
x 18
x 33

Re: Assembly "Component Display" setting

Unread post by RonE »

I think the official way is to use DisplayMode Property (IModelDocExtension).

However, much easier (and probably also working for you) is to use that:

swApp.runcommand 2567, ""

Just preselect the desired components and then run that command. ;)
User avatar
loeb
Posts: 68
Joined: Sun Jan 16, 2022 5:55 pm
Answers: 1
x 39
x 10

Re: Assembly "Component Display" setting

Unread post by loeb »

Thank you, RonE. That worked great!
Post Reply