bending angle create automatic note to export in a dxf

bending angle create automatic note to export in a dxf

Anonymous
Not applicable
665 Views
4 Replies
Message 1 of 5

bending angle create automatic note to export in a dxf

Anonymous
Not applicable

Hi,

I would to create an automatic note using the angle of the sheet metal part that can be export in my dxf.

 

Example: -90° that will appear in my dxf.

 

My software machine recognize the angle of the 3d that need to appear in my dxf.

 

Thanks

0 Likes
Accepted solutions (1)
666 Views
4 Replies
Replies (4)
Message 2 of 5

bhavik4244
Collaborator
Collaborator

@Anonymous 

 

This may solve your issue.

 

Dim oDoc As DrawingDocument = ThisApplication.ActiveDocument
Dim oSheet As Sheet = oDoc.ActiveSheet
Dim oView As DrawingView
Dim oCurve As DrawingCurve
Dim oBendNote As BendNote
Dim oViews = oSheet.DrawingViews

For Each oView In oViews
		For Each oCurve In oView.DrawingCurves

			If (oCurve.EdgeType = Inventor.DrawingEdgeTypeEnum.kBendDownEdge _
				Or oCurve.EdgeType = Inventor.DrawingEdgeTypeEnum.kBendUpEdge) Then

	oBendNote = oSheet.DrawingNotes.BendNotes.Add(oCurve)

				If oBendNote.Text.Contains("DOWN") Then
					Dim oText = Replace(oBendNote.Text, "DOWN", "DOWN")
					oBendNote.HideValue = True
					oBendNote.Text = oText
				End If
				If oBendNote.Text.Contains("UP") Then
					Dim oText = Replace(oBendNote.Text, "UP", "UP")
					oBendNote.HideValue = True
					oBendNote.Text = oText
				End If
			End If
			
			
		Next 
	Next

Bhavik Suthar
0 Likes
Message 3 of 5

Anonymous
Not applicable

Hi @bhavik4244 ,

 

We try your code but it gives us the following errors..

 

We need to change the code.

 

tommychampagne_0-1623846200291.png

 

Do you have a solution ?

 

Thanks in advance.

 

Tommy.

0 Likes
Message 4 of 5

bhavik4244
Collaborator
Collaborator
Accepted solution

@Anonymous 

 

remove the SubTest() and try to run...


Bhavik Suthar
0 Likes
Message 5 of 5

Moverano
Advocate
Advocate

Hello,

first, my congratulations for great ideas thaht arrive to forum. I'm a problem with code, I use on version 2015. Any ideas?  @Anonymous @bhavik4244 

 

Error on line 12: End of statement expected.

 

Sin título.jpg

0 Likes