Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Design view with Occurence

1 REPLY 1
Reply
Message 1 of 2
patrick.fillion
396 Views, 1 Reply

Design view with Occurence

I am working on some codes that let me make some change on visibility of occurence. So I am I main assembly, and 3 ocurences of the same sub-assembly. The sub assembly was saved on a design view named hole that is hidding some occurences.

 

if I work with one of those sub assembly (checkOcc as componentoccurence)

 

and then I try this:

                Debug.Print("Occurence name: " + CheckOcc.Name)
                Debug.Print("Is DRV associative: " + CheckOcc.IsAssociativeToDesignViewRepresentation.ToString)
                Debug.Print("The Active DRV is: " + CheckOcc.ActiveDesignViewRepresentation.ToString)
                CheckOcc.SetDesignViewRepresentation("Default")
                Debug.Print("Is DRV associative: " + CheckOcc.IsAssociativeToDesignViewRepresentation.ToString)
                Debug.Print("The Active DRV is: " + CheckOcc.ActiveDesignViewRepresentation.ToString)

 

The fist ime I check for the name, the result is empty, but is should hole as it's what I can see in the browser.

then I change it to default

The result of that, the representation views disapear from the browser for that occurence and still, the name is return as empty...

 

then I carry on with turning on the hidden occurences.

 

objCol.Add(checkocc)

dv.SetVisibilityOfOccurrences(objCol, visibility)

 

The result, all the hidden occurence appear ALSO on the other subassemblies... It look that it's affecting all the Designview of all occurence of that name...

 

then, if I try the reverse, by turning it off... the switch off on the other occurences but not the one that is checkocc!!!

 

Now I am lost on the way it is working... if I do it manually in the application. I don't have that funcky behavior!

 

 

 

1 REPLY 1
Message 2 of 2
adam.nagy
in reply to: patrick.fillion

Hi Patrick,

 

The disappearing browser nodes is logged in our system with title: " SetDesignViewRepresentation makes the View node of the occurrence disappear"

 

You could probably workaround this by selecting the node in the browser programmatically and then running the command that will activate it. 

 

But I could not reproduce the problem with the ActiveDesignViewRepresentation as it gave back the correct name.

 

Could you provide a non-confidential sample assembly to reproduce the problem?

Which Inventor version are you using?

 

Cheers,

 

 



Adam Nagy
Autodesk Platform Services

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report