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: 

To the iLogic and VBA masters question

1 REPLY 1
SOLVED
Reply
Message 1 of 2
R.I.Chernov
370 Views, 1 Reply

To the iLogic and VBA masters question

Hi experts, I'm very need your help!

Please sorry for my awful English, I'll try to explain in simple words what the problem I've got.

I have got an assembly ( name "Mjr assembly"). There is the sub assembly in it (name "SubAssembly").

I need to do two operations one by one.

 

1st step:

Change the level of detail representation of "SubAssembly" from "LODRep1" to "LODRep2" (after will appear the component which was stressed before , name "Part2")

 

2nd step:

"Part2" should be moved in the place I need.

 

To do the 1st "step" I used next code:

ThisApplication.ActiveDocument.ComponentDefinition.Occurrences.ItemByName("SubAssembly").SetLevelOfDetailRepresentation ("LODRep2")

After It I used ComponentOccurrence.SetTransformWithoutConstraints Method.

 

The problem is: The level of detail representation changes successfully, but  mistake appears, when program make the second operation. If run the programm second time there would be no misstake, cause the level of detail representation have been changed  before (when program have been running 1st time).

 

May be my question is not very hard, but after spending two days I still don't see the way to solve it. I beg you to help me!

 

Thank you in advanced at least for your patience in reading my bad grammar message 🙂

But if seriously, I really appreciate any help you can provide.

P.S. See the "example" file included in this letter. I put in it two equal rule fist in iLogic, second in VBA.

1 REPLY 1
Message 2 of 2
R.I.Chernov
in reply to: R.I.Chernov

Finally I've solved it 🙂

 

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

Post to forums  

Autodesk Design & Make Report