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: 

Ilogic to recognise nature of a part(for e.g sheet metal part with flat pattern or just a plain metal part)

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Anonymous
339 Views, 3 Replies

Ilogic to recognise nature of a part(for e.g sheet metal part with flat pattern or just a plain metal part)

Hi,

 

Does anyone know an ILogic expression which I can put in an If...elseIf statement to make the ilogic recognise the nature of the part, for example if the part has a flat pattern, it will run a first code only else if it will run another code.

 

Thanks.

 

Anas.

3 REPLIES 3
Message 2 of 4
JhoelForshav
in reply to: Anonymous

Hi @Anonymous 

Like this? 🙂

Dim oDoc As PartDocument = ThisDoc.Document
If TypeOf (oDoc.ComponentDefinition) Is SheetMetalComponentDefinition _
	AndAlso oDoc.ComponentDefinition.HasFlatPattern
	MsgBox("This part has a flat pattern")
Else
	MsgBox("No flat pattern")
End If
	
Message 3 of 4
Anonymous
in reply to: JhoelForshav

Hi, Let me try it and I will let you know. Thanks.

Message 4 of 4
Anonymous
in reply to: JhoelForshav

 It works , now let's hope it will cause no problem to my parts list 😉 

Thanks very much.

 

Anas.

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report