Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Linear diameter using ilogic

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
manu.marjanen
450 Views, 2 Replies

Linear diameter using ilogic

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

 

2 REPLIES 2
Message 2 of 3

@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



Message 3 of 3
theo.bot
in reply to: manu.marjanen

@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

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report