choose default design view representation when placing a component into an assembly

choose default design view representation when placing a component into an assembly

SevInventor
Advocate Advocate
145 Views
3 Replies
Message 1 of 4

choose default design view representation when placing a component into an assembly

SevInventor
Advocate
Advocate

Is there a way to set the DVR when placing a component into an assembly? I've searched a lot for that option. 
Generally i think nobody likes the visibility of unconsumed sketches and workplanes of every single part in an assembly.
placing a component in  Primary DVR and always switch to default DVR is really annoying and not everybody knows this workflow.


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

WCrihfield
Mentor
Mentor

Hi @SevInventor.  That would be nice.  There is an application level setting that helps, but is not 100% effective at this specific need.  In the application options, on the file tab, at the bottom is a button labeled File Open..., which controls the 'default' settings for representations when opening files.  On the Assembly tab & Part tab, I have the Design View set to 'Last Active', because the 'Default / DEFAULT' one is usually always either the only custom one, or the one active the majority of the time in all our model files.  That also seems to translate to when placing instances of components into an assembly.  But obviously, by its very nature, 'Last active' has a 'human' element to it, so not 100% reliable.  Unfortunately, since not every model document might have a 'custom' design view with exactly the same name, there is not an option at the application level for choosing that design view every time.

Beyond that, an Inventor add-in might be needed, because you would want that type of solution to be active when Inventor starts, and stay active the whole time Inventor is running, so it can monitor for, and catch the event where you add a component into an assembly, so that it can automatically attempt to set its design view for you.  When going that route, you can 'handle' the AssemblyEvents.OnNewOccurrence event.  It gives us access to the AssemblyDocument that the component was placed into.  And depending on the 'timing' (before or after) will give us access to either the ComponentDefinition of the new occurrence (in Context) before it is placed into the assembly (but not the occurrence itself), or will give us access to the actual ComponentOccurrence after it has been added, as well as its ComponentDefinition (in Context).  Using that event in its 'after' timing, you can attempt to set its DVR (DesignViewRepresentation) to that specific one immediately when it is placed into the assembly.

There are also events related to representations, but I doubt those would be of interest in this case.

RepresentationEvents 

ModelStateEvents 

Also, if we are using the 'Place' command, it will usually show a file dialog for us to browse for and choose a model file to place an instance of into the assembly, and while that file dialog is showing, there is usually a button near the bottom called 'Options...', and when we click that, we see that same small pop-up dialog asking about which representations of that file we want to use.  Still not as convenient as we want in this case, but something at least.  If you choose the model file before clicking that button, the list will be customized to that model file, and will actually include the custom DVR so that we can choose it.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 4

SevInventor
Advocate
Advocate

Hello Wesley,
thanks , I knew about these options and they're set to "last active".
Somehow we still have trouble switching all sketches and work planes invisible.
They keep showing up again.
Maybe our PLM System has something to do with it.

We usually place our components from there.
I'm afraid there is no final solution for us at the moment.
We should process all of our files and do the following steps:

 

  • set the DVR to default,
  • rename other names for default like "standard" or "Vorgabe" (in German) to the same name. to e.g. default.
  • switch of all planes and sketches
  • and save them automatically.

 

Maybe that would help


 

 

0 Likes
Message 4 of 4

WCrihfield
Mentor
Mentor
Accepted solution

Yes, there are definitely several steps involved, which is unfortunate, but usually with more control comes more complexity &/or responsibility.

We have all of our model templates set-up with default DVR's, and have them set as the active one, that way every new model file has it in them, and all visibility changes are saved in that DVR by default.  Since we have been doing things that way for a while, we have fewer issues like that.  However, a situation which overrides those settings is when you open an assembly in 'express mode'.  When in that mode, often the 'representations' are not considered, making sketches, and work features visible, or things just don't look right.  In those situations, when I click on that button in the ribbon to fully load the assembly, all those representations take effect, hiding the unwanted objects and making things look right again.  There have been a lot of attempts to handle all of those steps with one massive, complex code-based solution that gets ran from the highest level assembly, which recursively iterates down through everything.  Those types of process may seem to work OK temporarily if nothing has any DVRs, but are usually not that intuitive or permanent, depending on how your projects are set-up.  These things are best dealt with starting from the bottom (the parts), then working back towards the top (sub assemblies, then higher level assemblies).  This is because the DVR in the assembly remembers how you set the DVR's of all the component occurrences within that assembly, while that assembly level DVR was active.  So, the part level DVR's would need to exist first, then the assembly that you are about to place that component into should have the custom DVR, and it should be active, then the placed component occurrences of that part would need to be set to the DVR that you want, and so on up through the levels of higher assemblies.  Where an occurrence of a sub assembly is set to its custom DVR while the parent/owning assembly is set to its custom DVR, at each level.  Pretty difficult to do that entirely by code, from top down, after the fact.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes