iLogic AddRadius dimension bug?

iLogic AddRadius dimension bug?

Curtis_Waguespack
Consultant Consultant
219 Views
3 Replies
Message 1 of 4

iLogic AddRadius dimension bug?

Curtis_Waguespack
Consultant
Consultant

I'm curious if this is a bug, or if there is something I'm overlooking that would explain why I am seeing this error. See attached 2025 files.

 

If I run this version of the rule ( In Inventor 2025) I get the error shown :

 

 

Dim oSheet = ThisDrawing.Sheets.ItemByName("Sheet:1")
Dim oView = oSheet.DrawingViews.ItemByName("VIEW1")
Dim oDims = oSheet.DrawingDimensions.GeneralDimensions

oFace1 = oView.GetIntent("HoleEdge")
oPoint = oView.SheetPoint(-0.1, -0.1)

oDim = oDims.AddRadius("Radius99", oPoint, oFace1)

 

 

 

Curtis_Waguespack_1-1730743742816.png

 

 

If I remove Dim from the beginning of line 3 as shown in this version, it runs without error:

 

 

Dim oSheet = ThisDrawing.Sheets.ItemByName("Sheet:1")
Dim oView = oSheet.DrawingViews.ItemByName("VIEW1")
oDims = oSheet.DrawingDimensions.GeneralDimensions

oFace1 = oView.GetIntent("HoleEdge")
oPoint = oView.SheetPoint(-0.1, -0.1)

oDim = oDims.AddRadius("Radius99", oPoint, oFace1)

 

 

 

Curtis_Waguespack_2-1730744212735.png

 

Anyone have any ideas about this? @MjDeck 

EESignature

0 Likes
220 Views
3 Replies
Replies (3)
Message 2 of 4

Curtis_Waguespack
Consultant
Consultant

.

 

EESignature

0 Likes
Message 3 of 4

MjDeck
Autodesk
Autodesk

Hi Curtis,

Instead of removing the Dim statements, I recommend adding them to the lines that don't have them.
The important one is:

 

Dim oPoint = oView.SheetPoint(-0.1, -0.1)

 

I'm looking into this in more detail, but generally it's better to use Dim statements. That tells the VB compiler to infer the type of the object from what you're assigning to it. If you don't use Dim, it just creates a variable of type Object.

I see the same limitation in Inventor 2024. It's probably there in earlier versions as well. Maybe we can improve this.


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes
Message 4 of 4

Curtis_Waguespack
Consultant
Consultant

@MjDeck wrote:

Hi Curtis,

Instead of removing the Dim statements, I recommend adding them to the lines that don't have them.
The important one is:

Dim oPoint = oView.SheetPoint(-0.1, -0.1)

I'm looking into this in more detail, but generally it's better to use Dim statements. That tells the VB compiler to infer the type of the object from what you're assigning to it. If you don't use Dim, it just creates a variable of type Object.


 

 

ah, good point. This issue just popped up in a class I am teaching today and the unexpected behavior really stumped us...

 

Removing the Dim was just the first thing I tried that worked, but I take your point that it would be better to add Dim as you mentioned.

 

Thanks for taking a look at this Mike! 

EESignature

0 Likes