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: 

Using VBA to get vector for minimum distance between two parts

1 REPLY 1
Reply
Message 1 of 2
kperic777
1301 Views, 1 Reply

Using VBA to get vector for minimum distance between two parts

Does anyone know where is a good start for me to find out the following:

 

I need to automate the measuring of distance between two parts in an assembly and return or print the vector (deltaX, deltaY, deltaZ) values.  It will be looped around 20 times as an assembly constraint parameter value increases incrimentally. for example:

 

for i = 1 To 20

   ModelParamter.Item("d5").Value = ModelParamter.Item("d5").Value + 'Incriment'

   'code for measuring and "Debug.Printing" the

   'vector values from the measurement of minimum

   'distance between two specific part occurances in my assembly

   Next

 

I know how to inrement a parameter value in VBA, but i don't know how to return the vector for minimum distance between two parts.

 

Inventor 2011.

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

Hi,

 

Here is the article I wrote about this: http://adndevblog.typepad.com/manufacturing/2014/01/vector-of-minimum-distance.html

 

I hope this helps.

 

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