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: 

Minimum Distance between parts with iLogic

1 REPLY 1
Reply
Message 1 of 2
F.Goncalves
673 Views, 1 Reply

Minimum Distance between parts with iLogic

Hello,

 

I want to mesure the minimum distance between 2 parts. But I want Ilogic to know what parts to mesure according to what i've selected.

I have something like this but its not working... gives me always this error "

Measure.MinimumDistance: No entity named "System.__ComObject" was found."

 

any help? thanks!

 

 

Dim oOccurrence As ComponentOccurrence

Dim oOccurrence2 As ComponentOccurrence


Try

  oOccurrence = ThisDoc.Document.SelectSet.Item(1)

oOccurrence2 = ThisDoc.Document.SelectSet.Item(2)

Catch

  MessageBox.Show("Please select a component before running this rule.", "iLogic")

  Return

End Try 

Dim doc As Document

Dim CurFileName As String

  

oOccurrence = ThisApplication.ActiveDocument.SelectSet.Item(1) 

oOccurrence2 = ThisApplication.ActiveDocument.SelectSet.Item(2)

  

distance = Measure.MinimumDistance(oOccurrence,oOccurrence2)

MsgBox(distance)

 

 

Consider using "Accept as Solution" / "Kudos" if you find this helpful.
--
F.Goncalves
1 REPLY 1
Message 2 of 2
Logos_Atum
in reply to: F.Goncalves

Hello there,

 

wouldn´t it be possible to compare the object coordinates to give you what you want?

 

Kind regards

 

Daniel

Dogs aren´t flammable.

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

Post to forums  

Autodesk Design & Make Report