Check if flat pattern have bend line

Check if flat pattern have bend line

Anonymous
Not applicable
786 Views
1 Reply
Message 1 of 2

Check if flat pattern have bend line

Anonymous
Not applicable

Hello all,

is possibly to check if flat pattern have bend line? 

I´m using flat pattern for parts which don´t have to be flat pattern for getting main dimension and it easly take part to correct position- for drawing. 

 

I´m using rule for automatic name base view but... If I´m doing flat pattern in all parts, I need to clarify if the part is really bended or rounded by bend line or not for flat pattern symbol in drawing. 

 

So if base view (flat pattern) have bend line create base view label create below: 

Pos_

(scale)

symbol  

slo0102_0-1597822317663.png

if base view (flat pattern) don´t have bend line create base view label create without symbol 

 
 
 

Is it possible? 

Thanks a lot!

 

 

 

0 Likes
787 Views
1 Reply
Reply (1)
Message 2 of 2

WCrihfield
Mentor
Mentor

I'm not 100% sure what you mean by bend line, so I made a simple iLogic rule that will determine if the part document is either a regular part or a sheet metal part.  Then it checks if there are any BendPartFeatures.  BendPartFeatures can also be made within regular parts, using a sketched bend line and a this type of featurem, which bends the part at the specified line.  Then if it is a sheet metal part, it continues to check if its FlatPattern contains any FlatBendResults.  Then checks for the number of Bends.  FlatBendResults and Bends are both only found in sheet metal parts.

Here's the code.

Dim oPDoc As PartDocument = ThisApplication.ActiveDocument
If oPDoc.PropertySets.Item("Inventor User Defined Properties").Item("Document SubType Name").Value <> "Sheet Metal" Then
	MsgBox("This is a regular part, not a sheet metal part.")
	Dim oPDef As PartComponentDefinition = oPDoc.ComponentDefinition
	If oPDef.Features.BendPartFeatures.Count > 0 Then
		MsgBox("This part has at least one BendPartFeature.")
	End If
Else
	MsgBox("This is a Sheet Metal Part.")
	Dim oSMDef As SheetMetalComponentDefinition = oPDoc.ComponentDefinition
	If oSMDef.FlatPattern.FlatBendResults.Count > 0 Then
		MsgBox("This sheet metal part's FlatPattern contains at least one FlatBendResult.")
	Else
		MsgBox("This sheet metal part's FlatPattern contains no FlatBendResults.")
	End If
	If oSMDef.Bends.Count > 0 Then
		MsgBox("This sheet metal part has at least one Bend.")
	Else
		MsgBox("This sheet metal part has no Bends.")
	End If
	If oSMDef.Features.BendPartFeatures.Count > 0 Then
		MsgBox("This sheet metal part has at least one BendPartFeature.")
	Else
		MsgBox("This sheet metal part has no BendPartFeatures.")
	End If
End If

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes