Inventor 2018 API missing HealthStatus for iMates?

Inventor 2018 API missing HealthStatus for iMates?

Yadow
Enthusiast Enthusiast
757 Views
3 Replies
Message 1 of 4

Inventor 2018 API missing HealthStatus for iMates?

Yadow
Enthusiast
Enthusiast

Greetings fellow Inventor Users,

As I work frequently with iMates in Inventor 2018 I have found that there is no support in the API for getting the "healthstatus" of an iMate. Is this true?

I would like to delete imates that are no longer attached to a plane or has the referenced plane missing.

Best regards,

0 Likes
Accepted solutions (1)
758 Views
3 Replies
Replies (3)
Message 2 of 4

JhoelForshav
Mentor
Mentor
Accepted solution

Hi @Yadow 

I'm not really sure I understand what you mean as i'm not very used to working with iMates, but something like this maybe? 🙂

 

Dim oAsm As AssemblyDocument = ThisDoc.Document
For Each oImate As iMateResult In oAsm.ComponentDefinition.iMateResults
	For Each oConstraint As AssemblyConstraint In oImate.Constraints
		'MsgBox([Enum].GetName(GetType(Inventor.HealthStatusEnum), oConstraint.HealthStatus))
		If oConstraint.HealthStatus <> HealthStatusEnum.kUpToDateHealth Then oImate.Delete
		Exit For
	Next
Next
0 Likes
Message 3 of 4

Yadow
Enthusiast
Enthusiast

This did indeed help me with some of the issue. But the issue where an imate is missing a reference plane is still not solved 🙂 You have my thanks nonetheless!

0 Likes
Message 4 of 4

JhoelForshav
Mentor
Mentor

Glad I could help a little at least 🙂

To be honest I don't really know what it means that the iMate is missing a reference plane. Maybe if you attach a file here where that is the case I might be able to find a solution for it?

 

 

0 Likes