Auto dimension of assembly drawing having same pattern of dimensions

Auto dimension of assembly drawing having same pattern of dimensions

Anonymous
Not applicable
658 Views
4 Replies
Message 1 of 5

Auto dimension of assembly drawing having same pattern of dimensions

Anonymous
Not applicable

My task is to create general arrangement drawings. Assembly varies according to required components at top with  size.

Pattern of drawing dimension always remain same that is points from where we have to capture dimension is same for all sizes.

Like: Top to bottom dim, Center to top, center of one accessory to other's center.

 

Is there any way we can fix and automate so that dimension automatically get captured from set pattern at same location and every-time parts are changed i don't need to redraw it. 

 

Is it possible to give work-point on parts and then through iLogic derive linear dimension from one point to another automatically?

rishabhshanker_0-1594451138182.png

Please do share your ideas how can we achieve this. Thanks in advance.

 

 @Anonymous  @kelly.young  @Anonymous  @JDMather @mcgyvr  @Cadmanto  @jtylerbc @BDidit  @blair  @karthur1 

0 Likes
659 Views
4 Replies
Replies (4)
Message 2 of 5

Cadmanto
Mentor
Mentor

Welcome to the forum.

Couple thoughts.  Maybe make a template drawing resembling your GA with the model in it.

Next possibly make this assembly an iAssembly and have the said dimensions in your member table.

Can you chart the dimensions in a table?  With the dimensions on the parts showing an "A" , "B" "C" etc.

I don't know iLogic well, so I cannot help you there.

 

EE LOGO.png
Windows 10 x64 -16GB Ram
Intel i7-6700 @ 3.41ghz
nVidia GTS 250 - 1 GB
Inventor Pro 2020

 

Best Regards,
Scott McFadden
(Colossians 3:23-25)


Message 3 of 5

Anonymous
Not applicable

Thanks, yes this is surely a feasible solution but in my case already components and assembly are ready and those are independent from each other. It will be more challenging if now i go for iAssembly . And representing dimension with A,B and C is last option if not got success in any other way.

0 Likes
Message 4 of 5

kelly.young
Autodesk Support
Autodesk Support

Hello @Anonymous I see that you are visiting as a new member to the Inventor Forum.
Welcome to the Autodesk Community!

Check out this link about Named Faces and using iLogic to dimension them. 

iLogic create dimension using named geometry in idw

Where is New Feature Face Name in Inventor 2019 API located

Geometry Labels - Inventor 2019

 

Hope that helps!

 

Please select the Accept Solution button if a post solves your issue or answers your question.

Message 5 of 5

Anonymous
Not applicable

I used below code by Assigning Name to edges.It ran successfully if assembly has only 1 component but getting error (as below) when 2 or more component in assembly.

Please help me to debug it.

rishabhshanker_0-1595951710056.png

rishabhshanker_1-1595952330003.png

rishabhshanker_2-1595952463389.png

Code is as below:

Sub CreateAutoDim()

Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument

'Refrence active sheet
Dim oSheet As Sheet
Set oSheet = oDrawDoc.ActiveSheet

'Reference the view we want
Dim oView As DrawingView
Set oView = oSheet.DrawingViews.Item(1)

'Reference Assembly
Dim oAssembly As AssemblyDocument
Set oAssembly = oView.ReferencedDocumentDescriptor.ReferencedDocument

Dim oGeneralDims As GeneralDimensions
Set oGeneralDims = oSheet.DrawingDimensions.GeneralDimensions

For i = 1 To oAssembly.ReferencedDocuments.Count
MsgBox i
Set oModelDoc = oAssembly.ReferencedDocuments.Item(i)
Dim Edge1 As Edge
Set oObjs = oModelDoc.AttributeManager.FindObjects("*", "*", "Top")
Set Edge1 = oObjs.Item(i)

 

Dim Edge2 As Edge
Set oObjs = oModelDoc.AttributeManager.FindObjects("*", "*", "Bottom")
Set Edge2 = oObjs.Item(i)
Next

 

For Each Occurrence In oAssembly.ComponentDefinition.Occurrences

Set oCompOcc = Occurrence
Dim oOccEdge1Proxy As EdgeProxy
Dim oOccEdge2Proxy As EdgeProxy

Call oCompOcc.CreateGeometryProxy(Edge1, oOccEdge1Proxy)
Call oCompOcc.CreateGeometryProxy(Edge2, oOccEdge2Proxy)

Next

Dim aoDrawCurves1 As DrawingCurve
Set oDrawViewCurves = oView.DrawingCurves(oOccEdge1Proxy)
Set aoDrawCurves1 = oDrawViewCurves.Item(1)

Dim aoDrawCurves2 As DrawingCurve
Set oDrawViewCurves = oView.DrawingCurves(oOccEdge2Proxy)
Set aoDrawCurves2 = oDrawViewCurves.Item(1)

Dim GI1 As GeometryIntent
Set GI1 = oSheet.CreateGeometryIntent(aoDrawCurves1)

Dim GI2 As GeometryIntent
Set GI2 = oSheet.CreateGeometryIntent(aoDrawCurves2)

Dim Textpoint As Point2d
Dim XPos As Double
Dim YPos As Double

XPos = oView.Left - 3
YPos = oView.Top - (oView.Height / 2)

Set Textpoint = ThisApplication.TransientGeometry.CreatePoint2d(XPos, YPos)

Dim oDim1 As GeneralDimension
Set oDim1 = oGeneralDims.AddLinear(Textpoint, GI1, GI2)

End Sub

 

 

Below is link on video from where I taken the code:

https://www.youtube.com/watch?v=7_0YuPYmGyY&t=2177s

 

@kelly.young @Cadmanto @HermJan.Otterman @hozz__ 

0 Likes