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: 

Need to assign X, Y, X offset (0.000) and apply ground constraint

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
RoyWickrama_RWEI
475 Views, 2 Replies

Need to assign X, Y, X offset (0.000) and apply ground constraint

In my skelton modelling assemblies, for all possible parts and assemblies, I assign X, Y and Z offsets zero and then ground - from within Occurance tab of iProperties tool pallet. I like to do the same with an iLogic for which I request help.

 

Autodesk Inventor - 2014

 

Thanks.

 

Best Regards.

 

 

2 REPLIES 2
Message 2 of 3

Hi,

 

If I understand you correctly then this should help:
http://adndevblog.typepad.com/manufacturing/2014/10/set-the-offset-of-components-to-zero-and-ground-...

 

Cheers,



Adam Nagy
Autodesk Platform Services
Message 3 of 3

Hi Adam Nagi,

 

Dim doc As AssemblyDocument
doc = ThisApplication.ActiveDocument

Dim tr As TransientGeometry
tr = ThisApplication.TransientGeometry

Dim occ As ComponentOccurrence
For Each occ In doc.ComponentDefinition.Occurrences
    ' If it's suppressed we cannot do
    ' anything with it
    If Not occ.Suppressed Then
        Call occ.SetTransformWithoutConstraints(tr.CreateMatrix())
        occ.Grounded = True
    End If
Next

 

Shown above is the code (as is) per your guidance. Thanks a lot. That is 100% what I need currently. It is working so nice and is definitely a great help on my huge-assembly skeleton modelling.

 

Best Regads;

 

Roy Wickrama

Autodesk Inventor - 2014 & Vault Basic 2014

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

Post to forums  

Autodesk Design & Make Report