Dimensioning sheet metal parts

Dimensioning sheet metal parts

jkorson
Enthusiast Enthusiast
1,066 Views
6 Replies
Message 1 of 7

Dimensioning sheet metal parts

jkorson
Enthusiast
Enthusiast

Is there any quick tips how to efficiently dimension out a flat pattern and a folded model? Is there any example code(s) I can follow to dimension out a folded sheet metal part views and a flat pattern view?

0 Likes
Accepted solutions (1)
1,067 Views
6 Replies
Replies (6)
Message 2 of 7

JelteDeJong
Mentor
Mentor

You might want to check out my blog. you can find posts about automatically generating bend notes, Overall dimensionsHole position and Bend dimensions

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

Message 3 of 7

jkorson
Enthusiast
Enthusiast

@JelteDeJong 

A couple questions about your code:

  1. In your "Overall Dimension" code, how does it recognize the intent?
  2. In all your coding, is there a reason why you don't comment on what is happening in your code?
  3.  I cannot get the intent to snap to the edges with I add a break in the view. Could you please give me some guidance on how to correct this? (Please see attached image)
  4. Since I cant use attributes to get intent on dimensioning the flanges on the flat pattern, how would you define those lines to dimension them?

Otherwise Your code works great! I also appreciate the help.

0 Likes
Message 4 of 7

jkorson
Enthusiast
Enthusiast
Accepted solution

After a bunch of trail and error, I have developed some code that works for me. This code was created in Inventor 2022 and might not work in previous versions as it uses iLogic manage objects. I tried using Inventor's API but could not access the flat pattern features. Below is my code that I used to create an origin point and create two ordinate dimensions. To see how to get work points on flat pattern see: Solved: Placing origin indicator on a flat pattern - Autodesk Community - Inventor 

 

'Sets the origin workpoint on the flat pattern view. Also creates two ordinate dimensions.
' Set a reference to the drawing document.
' This assumes a drawing document is active.
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument

' Set a reference to the active sheet.
Dim oActiveSheet As Sheet
oActiveSheet = oDrawDoc.ActiveSheet

'Reference the View we want.
Dim oView As DrawingView = ActiveSheet.View("FlatPattern").View

Dim iSheet = ThisDrawing.Sheets.ItemByName(ThisApplication.ActiveDocument.ActiveSheet.Name)
Dim iView = iSheet.DrawingViews.ItemByName("FlatPattern")
Dim WorkPoint_Origin = iView.GetIntent("WorkPoint Origin")

' If origin indicator has not been already created, create it first.
If Not oView.HasOriginIndicator Then
	oView.CreateOriginIndicator(WorkPoint_Origin)
	oView.OriginIndicator.Visible = True
Else
	oView.OriginIndicator.Intent = WorkPoint_Origin
End If

' Set a reference to the ordinate dimensions collection.
Dim oOrdinateDimensions As OrdinateDimensions
oOrdinateDimensions = oActiveSheet.DrawingDimensions.OrdinateDimensions

' Create point intents to anchor the dimension to.
Dim GI1 = iView.GetIntent("Dimension WP:3")
Dim GI2 = iView.GetIntent("Dimension WP:4")

'Create a point for the text
Dim TextPoint1 As Point2d
Dim XPos As Double
Dim YPos As Double
XPos = oView.Left + 1.25
YPos = oView.Top + 1.25
TextPoint1 = ThisApplication.TransientGeometry.CreatePoint2d(XPos, YPos)

Dim TextPoint2 As Point2d
XPos = oView.Left + 5.25
YPos = oView.Top + 1.25
TextPoint2 = ThisApplication.TransientGeometry.CreatePoint2d(XPos, YPos)

' Create the first ordinate dimension.
Dim oOrdinateDimension1 As OrdinateDimension
oOrdinateDimension1 = oOrdinateDimensions.Add(GI1, TextPoint1, kVerticalDimensionType)

' Create the second ordinate dimension.
Dim oOrdinateDimension2 As OrdinateDimension
oOrdinateDimension2 = oOrdinateDimensions.Add(GI2, TextPoint2, kVerticalDimensionType)

 

0 Likes
Message 5 of 7

rcolon9E4ZX
Advocate
Advocate

@JelteDeJong ,

 

Your add-ons, namely Hole Dimensions; Overall Dimensions; and Bend Notes, are intriguing. I could see us implementing this code to automate flat pattern detailing for sheetmetal. Are any of these programs available as VBA modules?

 

Many thanks and kind regards,

Rafael

 

INV2022.3 PRO, WIN10PRO

0 Likes
Message 6 of 7

JelteDeJong
Mentor
Mentor

@rcolon9E4ZX 

These are not addins but iLogic rules. Probably you could convert them to VBA. But I think you should not do that. In my post "Is VBA in Inventor obsolete?" I explained why.

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

0 Likes
Message 7 of 7

rcolon9E4ZX
Advocate
Advocate

@JelteDeJong ,

 

Thank you for the response. I have used VBA for the past 5yrs in Inventor as it was accessible. I see examples of Inventor macros that are in C-sharp or VB.Net. Do I need to run these from Visual Studio? I could convert my code, but I would not know how to run it.

 

Kind regards,

0 Likes