Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Trying to change a subassembly position in a top level assembly

5 REPLIES 5
Reply
Message 1 of 6
MAC30
7789 Views, 5 Replies

Trying to change a subassembly position in a top level assembly

I've tried this code here after setting the assmebly flexible in the top level but it doesn't work.  Maybe i'm doing something wrong????

 

ThisApplication.ActiveDocument.ComponentDefinition?.RepresentationsManager.PositionalRepresentations(?"Test").Activate

 

I will be pulling the subassemblies in as read-only parts and I would like to change the postional representation with code in the top level assembly.  Is this possible?

5 REPLIES 5
Message 2 of 6
Curtis_Waguespack
in reply to: MAC30

Hi MAC30,

 

I'm not sure I understand what you're attempting to do (change the representation? or place the subassembly using a representation?), but it looks like maybe you're trying to do this with iLogic and not VBA?

 

If so firstly, be sure that you really need to use code for this:

http://forums.autodesk.com/t5/Autodesk-Inventor/Changing-Positional-Representation-of-SubAssembly-Us...

 

Secondly, see this link for an example for changing the Positional Representation via iLogic:

http://forums.autodesk.com/t5/Autodesk-Inventor/pos-rep-view-rep-and-ilogic/m-p/3372543#M428673

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

Message 3 of 6
MAC30
in reply to: Curtis_Waguespack

I have a subassembly (subA)  that will be used in different top level assemblies, and will have multiple veiws for both those assemblies.  Ex

 

Assembly 1

   SubA

   SubB (reps 1 and 2) depending on excel paramenters

   SubC

 

Direfferent assembly also uses SubA

 

Assembly 2

   SubA (reps 1, 3 &4) depending on excel parameters

   SubD

   SubE

 

SubA will be in a standard directory that I will not have write access to.  I want to create 4 different positional reps and show the correct rep in the top level assemblies based on the parameter values.

 

The only file I will have open is the top_level assembly, which will have SubA in it set to the "master" rep, but after I update my excel parameter sheet I want the correct position rep of SubA to be shown in the assembly.  I will not be adding position reps to the top level assembly.

 

Is this possibly?

Message 4 of 6
MAC30
in reply to: Curtis_Waguespack

To make things simple, I'd like to be able to change the Positional Rep of an subassembly by using ILogic in the assembly it is placed in.  Sort of like the IPart Change row, but I'm just wanting to change the Positional rep.

Message 5 of 6
MAC30
in reply to: MAC30

Anyone?

Message 6 of 6
Curtis_Waguespack
in reply to: MAC30

Hi MAC30,

 

I started looking into this yesterday afternoon and I think you'll want to use the SetPositionalRepresentationOverride method on the subassembly component occurrence to do this. Also, I think you might need to have a positional representation at the top level assembly in order to set the subassembly postional override.

 

Do you have some code started? If so it might be helpful to share what you have so far.

 

Also just as a tip, since your request involves the Inventor API, you might have better luck searching and asking this type question on the Inventor Customization forum:
http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

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

Post to forums  

Autodesk Design & Make Report