K factor name in the drawing view

K factor name in the drawing view

aurel_e
Collaborator Collaborator
590 Views
2 Replies
Message 1 of 3

K factor name in the drawing view

aurel_e
Collaborator
Collaborator

Hi all,

 

we have named our K factors to show the bending tools i.e "MS 1.5mm - r0.6 - V12" is for

Material 1.5mm mild steel

Top tool radius 0.6

Bottom tool V12

 

Is there any way to extract the K factor name automatically (with Ilogic?) in the part drawing to show to the press brake operator? I would prefer to  have it without opening the sheetmetal parts and creating another user parameter for each of them.

Thanks.

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

JhoelForshav
Mentor
Mentor
Accepted solution

Hi @aurel_e 

I suppose youre talking about the unfold rule? Try running this iLogic code in the drawing: 

Dim oDoc As DrawingDocument = ThisDoc.Document
For Each oSheet As Sheet In oDoc.Sheets
	For Each oView As DrawingView In oSheet.DrawingViews
		Dim refDoc As Document = oView.ReferencedDocumentDescriptor.ReferencedDocument
		If refDoc.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then
			oView.Label.FormattedText = refDoc.ComponentDefinition.UnfoldMethod.Name
			oView.ShowLabel = True
		End If
	Next
Next

''SheetMetal Style
'Dim oDoc As DrawingDocument = ThisDoc.Document
'For Each oSheet As Sheet In oDoc.Sheets
'	For Each oView As DrawingView In oSheet.DrawingViews
'		Dim refDoc As Document = oView.ReferencedDocumentDescriptor.ReferencedDocument
'		If refDoc.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then
'			oView.Label.FormattedText = refDoc.ComponentDefinition.ActiveSheetMetalStyle.Name
'			oView.ShowLabel = True
'		End If
'	Next
'Next

If it's the sheetmetal style you're talking about, then use the commented out code instead 🙂

Message 3 of 3

aurel_e
Collaborator
Collaborator

It's perfect.

I will  just need to integrate it to a drawing view label rule I've got already.

Many thanks.