Can ilogic check if my part is a multi-body part?

Can ilogic check if my part is a multi-body part?

b_ruijter
Advocate Advocate
889 Views
3 Replies
Message 1 of 4

Can ilogic check if my part is a multi-body part?

b_ruijter
Advocate
Advocate

Hello,

 

We use a rule that makes flat-pattens if a part is a sheet metal part. But a multi-body part can not make flat patterns. I was wondering if i can let the rule check if the part is an multi-body part first?

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

Mark.Lancaster
Consultant
Consultant

@b_ruijter 

 

Programming needs for Inventor should be asked in the Inventor customization forum.  https://forums.autodesk.com/t5/inventor-customization/bd-p/120

 

I will have the moderator relocate your posting there.

Mark Lancaster


  &  Autodesk Services MarketPlace Provider


Autodesk Inventor Certified Professional & not an Autodesk Employee


Likes is much appreciated if the information I have shared is helpful to you and/or others


Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.

Message 3 of 4

mcgyvr
Consultant
Consultant
Accepted solution

Not sure if there is a better way

oDoc = ThisApplication.ActiveDocument
oCount = oDoc.ComponentDefinition.SurfaceBodies.Count 
If oCount > 1
	MessageBox.Show("Multi-Body", "Hey look")
End If


-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
Message 4 of 4

WCrihfield
Mentor
Mentor

Here's a slighly different and equally simple way.

Dim oPDoc As PartDocument = ThisApplication.ActiveDocument
Dim oPDef As PartComponentDefinition = oPDoc.ComponentDefinition
MsgBox("HasMultipleSolidBodies = " & oPDef.HasMultipleSolidBodies.ToString)

Wesley Crihfield

EESignature

(Not an Autodesk Employee)