Creating dimensions with iLogic

Creating dimensions with iLogic

CCarreiras
Mentor Mentor
751 Views
7 Replies
Message 1 of 8

Creating dimensions with iLogic

CCarreiras
Mentor
Mentor

Hi!

 

I'm using the iLogic code below to create dimensions.

 

I'm able to create the bottom dimensions, but i'm not having success creating the top dimensions (the red ones in the image).
The main difference is that the problematic dimensions are based in a fillet, while the others are based in strait lines.

Anyway, in the view, all the geometry involved are represented by strait lines.

 

How can we create the dimensions in the filet.


CCarreiras_0-1725508538586.png

CCarreiras_1-1725508579433.png

 

Dim Sheet_1 = ThisDrawing.Sheets.ItemByName("Sheet:1")
	Dim VIEW1 = Sheet_1.DrawingViews.ItemByName("VIEW1")	
		Dim genDims = Sheet_1.DrawingDimensions.GeneralDimensions


Dim back = VIEW1.GetIntent("back")
Dim front = VIEW1.GetIntent("front")
Dim bck = VIEW1.GetIntent("bck")
Dim frt = VIEW1.GetIntent("frt")
Dim cbck = VIEW1.GetIntent("cbck")
Dim cfrt = VIEW1.GetIntent("cfrt")


Dim linDim1 = genDims.AddLinear("Dimension 1", VIEW1.SheetPoint(0.5, -2), back, bck)
Dim linDim2 = genDims.AddLinear("Dimension 2", VIEW1.SheetPoint(0.5, -2), front, frt)
Dim linDim3 = genDims.AddLinear("Dimension 3", VIEW1.SheetPoint(0.5, -2), bck, frt)

'PROBLEMATIC LINE Dim linDim4 = genDims.AddLinear("Dimension 4", VIEW1.SheetPoint(0.5, 2), cbck, cfrt)
Dim linDim5 = genDims.AddLinear("Dimension 5", VIEW1.SheetPoint(0.5, 2), back, cbck)

 

CCarreiras

EESignature

0 Likes
Accepted solutions (1)
752 Views
7 Replies
Replies (7)
Message 2 of 8

Curtis_Waguespack
Consultant
Consultant
Accepted solution

Hi @CCarreiras ,

 

See the example below.

 

When working with circular edges we often need to specify a point on the curve for the intent.

 

Hope that helps,

Curtis

 

Dim Sheet_1 = ThisDrawing.Sheets.ItemByName("Sheet:1")
Dim VIEW1 = Sheet_1.DrawingViews.ItemByName("VIEW1")
Dim genDims = Sheet_1.DrawingDimensions.GeneralDimensions


Dim back = VIEW1.GetIntent("back")
Dim front = VIEW1.GetIntent("front")
Dim bck = VIEW1.GetIntent("bck")
Dim frt = VIEW1.GetIntent("frt")
Dim cbck = VIEW1.GetIntent("cbck", PointIntentEnum.kCircularTopPointIntent)
Dim cfrt = VIEW1.GetIntent("cfrt", PointIntentEnum.kCircularTopPointIntent)


Dim linDim1 = genDims.AddLinear("Dimension 1", VIEW1.SheetPoint(0.5, -2), back, bck)
Dim linDim2 = genDims.AddLinear("Dimension 2", VIEW1.SheetPoint(0.5, -2), front, frt)
Dim linDim3 = genDims.AddLinear("Dimension 3", VIEW1.SheetPoint(0.5, -2), bck, frt)

Dim linDim4 = genDims.AddLinear("Dimension 4", VIEW1.SheetPoint(0.5, 2), cbck, cfrt)
Dim linDim5 = genDims.AddLinear("Dimension 5", VIEW1.SheetPoint(0.5, 2), back, cbck)

 

EESignature

Message 3 of 8

CCarreiras
Mentor
Mentor

Understood...

Thank You @Curtis_Waguespack, it works.

 

CCarreiras

EESignature

0 Likes
Message 4 of 8

CCarreiras
Mentor
Mentor

In the test it worked very well for more then one slot,

 

CCarreiras_0-1725546544917.png

 

...but... when i try to apply in a similar case, it works only for the first slot alone, it doesn't work for any of the others.

CCarreiras_2-1725546657128.png

 

CCarreiras_1-1725546617267.png

 

Inventor cant see the entity(??!!). What can it be?

 

Dim Sheet_1 = ThisDrawing.Sheets.ItemByName("Sheet:1")
	Dim VIEW1 = Sheet_1.DrawingViews.ItemByName("VIEW1")	
		Dim genDims = Sheet_1.DrawingDimensions.GeneralDimensions

	Dim Fx_Int_1_CBtm = VIEW1.GetIntent("Fx_Int_1_CBtm", PointIntentEnum.kCircularTopPointIntent)
	Dim Fx_Int_1_CTop = VIEW1.GetIntent("Fx_Int_1_CTop", PointIntentEnum.kCircularTopPointIntent)
	Dim Fx_Int_2_CBtm = VIEW1.GetIntent("Fx_Int_2_CBtm", PointIntentEnum.kCircularTopPointIntent)
	Dim Fx_Int_2_CTop = VIEW1.GetIntent("Fx_Int_2_CTop", PointIntentEnum.kCircularTopPointIntent)
'	Dim Fx_Int_3_CBtm = VIEW1.GetIntent("Fx_Int_3_CBtm", PointIntentEnum.kCircularTopPointIntent)
'	Dim Fx_Int_3_CTop = VIEW1.GetIntent("Fx_Int_3_CTop", PointIntentEnum.kCircularTopPointIntent)
'	Dim Fx_Int_4_CBtm = VIEW1.GetIntent("Fx_Int_4_CBtm", PointIntentEnum.kCircularTopPointIntent)
'	Dim Fx_Int_4_CTop = VIEW1.GetIntent("Fx_Int_4_CTop", PointIntentEnum.kCircularTopPointIntent)
	
		Dim Btm_End_Dim = VIEW1.GetIntent("Btm_End_Dim")
'____________________________________________________

	Dim linDim13dc = genDims.AddLinear("Dimension 13dc", VIEW1.SheetPoint(0.5, -1), Fx_Int_1_CBtm, Btm_End_Dim)
	Dim linDim14dc = genDims.AddLinear("Dimension 14dc", VIEW1.SheetPoint(0.5, -0.75), Fx_Int_1_CTop, Fx_Int_1_CBtm)
	
	Dim linDim15dc = genDims.AddLinear("Dimension 15dc", VIEW1.SheetPoint(0.5, -2.75), Fx_Int_2_CBtm, Btm_End_Dim)
	Dim linDim16dc = genDims.AddLinear("Dimension 16dc", VIEW1.SheetPoint(0.5, -2.75), Fx_Int_2_CTop, Fx_Int_2_CBtm)
	
'	Dim linDim17dc = genDims.AddLinear("Dimension 17dc", VIEW1.SheetPoint(0.5, -3.5), Fx_Int_3_CBtm, Btm_End_Dim)
'	Dim linDim18dc = genDims.AddLinear("Dimension 18dc", VIEW1.SheetPoint(0.5, -3.5), Fx_Int_3_CTop, Fx_Int_3_CBtm)
	
'	Dim linDim19dc = genDims.AddLinear("Dimension 19dc", VIEW1.SheetPoint(0.5, -4.25), Fx_Int_4_CBtm, Btm_End_Dim)
'	Dim linDim20dc = genDims.AddLinear("Dimension 20dc", VIEW1.SheetPoint(0.5, -4.25), Fx_Int_4_CTop, Fx_Int_4_CBtm)

 

 

CCarreiras

EESignature

0 Likes
Message 5 of 8

Curtis_Waguespack
Consultant
Consultant

Hi @CCarreiras ,

 

Generally that means that the edge or point is not visible in the view because some other geometry is hiding it or something like that.

 

I opened your files in Inventor 2025 and uncommented all the of the lines, and it ran without error. So I'm not sure what the issue is that you were seeing?

 

Curtis_Waguespack_0-1725550584889.png

 

EESignature

Message 6 of 8

CCarreiras
Mentor
Mentor

@Curtis_Waguespack You're right...

I installed the Inventor recent update and i started to have some odd behaviours.

Now, i uninstalled the update and it's working well.

 

Again, thank You for your time, cheers!

CCarreiras

EESignature

0 Likes
Message 7 of 8

CGBenner
Community Manager
Community Manager

@johnsonshiue ☝️ is this something that needs to be looked into?

@CCarreiras what is the actual update release that you are on?

Did you find a post helpful? Then feel free to give likes to these posts!
Did your question get successfully answered? Then just click on the 'Accept solution' button.  Thanks and Enjoy!


Chris Benner
Community Manager

Message 8 of 8

CCarreiras
Mentor
Mentor

The problems reported started when i installed the most recent Inventor update: 2025.1.1

 

The questions I found were:

1-The rules I reported in this post did not work as expected.

2- When exchanged between open files, the iLogic browser components disappeared; rules, forms, etc. By closing/opening the iLogic browser, the ilogic elements appeared again, as expected.

 

Now , i'm back to 2025.0.1 version, and things work as expected. 

CCarreiras

EESignature

0 Likes