Linear diameter using ilogic

Linear diameter using ilogic

manu.marjanen
Advocate Advocate
635 Views
2 Replies
Message 1 of 3

Linear diameter using ilogic

manu.marjanen
Advocate
Advocate

How to modify this code to create a linear diameter?

Dim Sheet_1 = ThisDrawing.Sheets.ItemByName("Sheet:1")
Dim view_A = Sheet_1.DrawingViews.ItemByName("A")
Dim Face0 = view_A.GetIntent("Part:1", "Face0") 'Part:1 Assign name "Face0"
Dim Z_Axis = view_A.GetIntent("Z Axis") 'Assembly ZAxis

Dim genDims = Sheet_1.DrawingDimensions.GeneralDimensions
Dim linDim1 = genDims.AddLinear("Dimension 1", view_A.SheetPoint(-0.5, 1.05), Face0)

manumarjanen_0-1632295734407.png

 

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

chandra.shekar.g
Autodesk Support
Autodesk Support

@manu.marjanen,

 

Please refer below forum discussion for creating linear diameter dimension.

 

https://forums.autodesk.com/t5/inventor-forum/creating-linear-diameter-dimension-using-api/td-p/6238...

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 3 of 3

theo.bot
Collaborator
Collaborator
Accepted solution

@manu.marjanen 

 

you just need to add the dimension style to you code:

 

Dim linDim1 = genDims.AddLinear("Dimension 1", view_A.SheetPoint(-0.5, 1.05), Face0,kDiametricDimensionType)

 

theobot_0-1632835747415.png

theobot_1-1632836110075.png

 

0 Likes