Auto-Dimensions Using Entities - in assembly drawing

Auto-Dimensions Using Entities - in assembly drawing

nagesh_l
Explorer Explorer
447 Views
7 Replies
Message 1 of 8

Auto-Dimensions Using Entities - in assembly drawing

nagesh_l
Explorer
Explorer

Hello Everyone,

I Use Inventor 2022, I Have a Design Automated Assembly using I-Logic. In this assembly these is a Virtual Model Which has Entities in it. When I Create a assembly Drawing for this assembly. Using These Part's Entities I wrote a Rule To Create a Auto-Dimensions for that Particular part itself in the assembly drawing but when I run The rule it says these entities are not available. I cross- checked Entities in that part and are still there but the rule is not working. Please help me with some solutions

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

A.Acheson
Mentor
Mentor

Hi @nagesh_l 

Can you provide the code your using, the assembly structure and the error messages your receiving. 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 3 of 8

nagesh_l
Explorer
Explorer
Dim Sheet_1 = ThisDrawing.Sheets.ItemByName("INTEGRAL CONNECTING ROD:1")
Dim VIEW1 = Sheet_1.DrawingViews.ItemByName("A")

Dim namedGeometry1 = VIEW1.GetIntent("MASTER VIRTUAL MODEL:1", "BIGEND")
Dim namedGeometry2 = VIEW1.GetIntent("MASTER VIRTUAL MODEL:1", "SMALLEND")
Dim namedGeometry3 = VIEW1.GetIntent("MASTER VIRTUAL MODEL:1", "BIGEND_AXIS")
Dim namedGeometry4 = VIEW1.GetIntent("MASTER VIRTUAL MODEL:1", "SMALLEND_AXIS")
Dim namedGeometry5 = VIEW1.GetIntent("MASTER VIRTUAL MODEL:1", "BIGEND_TOP")
Dim namedGeometry6 = VIEW1.GetIntent("MASTER VIRTUAL MODEL:1", "SMALLEND_TOP")
Dim namedGeometry7 = VIEW1.GetIntent("MASTER VIRTUAL MODEL:1", "BIGEND_BOTTOM")
Dim namedGeometry8 = VIEW1.GetIntent("MASTER VIRTUAL MODEL:1", "SMALLEND_BOTTOM")


Dim genDims = Sheet_1.DrawingDimensions.GeneralDimensions

ThisDrawing.BeginManage()
If True Then 
	Dim linDim1 = genDims.AddLinear("BIGEND_AXIS-SMALLEND_AXIS", VIEW1.SheetPoint(0.5, 1.4), namedGeometry3, namedGeometry4)
	Dim linDim2 = genDims.AddLinear("BIGEND_TOP-BIGEND_BOTTOM", VIEW1.SheetPoint(0.1, -0.1), namedGeometry5, namedGeometry7)
	Dim linDim3 = genDims.AddLinear("SMALLEND_TOP-SMALLEND_BOTTOM", VIEW1.SheetPoint(1, 2), namedGeometry6, namedGeometry8)
    Dim holeDim = genDims.AddDiameter("BIGEND", VIEW1.SheetPoint(0.25, 0.45), VIEW1.GetIntent("SMALLEND"))
End If

nagesh_l_0-1745465806921.png

 

0 Likes
Message 4 of 8

BM_Ashraf
Advocate
Advocate

Hi,

Please test the script below.
I think you were picking the wrong Drawing view

 

Dim Sheet_1 = ThisDrawing.Sheets.ItemByName("Sheet:1")
Dim VIEW1 = Sheet_1.DrawingViews.ItemByName("A")

Dim namedGeometry1 = VIEW1.GetIntent("MASTER VIRTUAL MODEL:1", "BIGEND")
Dim namedGeometry2 = VIEW1.GetIntent("MASTER VIRTUAL MODEL:1", "SMALLEND")
Dim namedGeometry3 = VIEW1.GetIntent("MASTER VIRTUAL MODEL:1", "BIGEND_AXIS")
Dim namedGeometry4 = VIEW1.GetIntent("MASTER VIRTUAL MODEL:1", "SMALLEND_AXIS")
Dim namedGeometry5 = VIEW1.GetIntent("MASTER VIRTUAL MODEL:1", "BIGEND_TOP")
Dim namedGeometry6 = VIEW1.GetIntent("MASTER VIRTUAL MODEL:1", "SMALLEND_TOP")
Dim namedGeometry7 = VIEW1.GetIntent("MASTER VIRTUAL MODEL:1", "BIGEND_BOTTOM")
Dim namedGeometry8 = VIEW1.GetIntent("MASTER VIRTUAL MODEL:1", "SMALLEND_BOTTOM")


Dim genDims = Sheet_1.DrawingDimensions.GeneralDimensions

ThisDrawing.BeginManage()
If True Then 
	Dim linDim1 = genDims.AddLinear("BIGEND_AXIS-SMALLEND_AXIS", VIEW1.SheetPoint(0.5, 2.25), namedGeometry3, namedGeometry4)
	Dim linDim2 = genDims.AddLinear("BIGEND_TOP-BIGEND_BOTTOM", VIEW1.SheetPoint(-0.1, -0.1), namedGeometry5, namedGeometry7)
	Dim linDim3 = genDims.AddLinear("SMALLEND_TOP-SMALLEND_BOTTOM", VIEW1.SheetPoint(1.15, 2), namedGeometry6, namedGeometry8)
End If

Dim view_A = Sheet_1.DrawingViews.ItemByName("A")
Dim BIGEND = view_A.GetIntent("MASTER VIRTUAL MODEL:1", "BIGEND")
Dim holeDim = genDims.AddDiameter("BIGEND", VIEW1.SheetPoint(1, 2.5), BIGEND)
Dim SMALLEND = view_A.GetIntent("MASTER VIRTUAL MODEL:1", "SMALLEND")
Dim holeDim2 = genDims.AddDiameter("SMALLEND", VIEW1.SheetPoint(1, 2.5),SMALLEND )

 

If this solved your problem, or answered your question, please click ACCEPT SOLUTION.

Blue Mech

Add-ins for Inventor!

0 Likes
Message 5 of 8

nagesh_l
Explorer
Explorer

nagesh_l_0-1745494225507.png

Sir, again I am facing this error. Please help me

0 Likes
Message 6 of 8

BM_Ashraf
Advocate
Advocate

Plesae check if any Entity is missing or Changed.

I tested it and it's working fine

If this solved your problem, or answered your question, please click ACCEPT SOLUTION.

Blue Mech

Add-ins for Inventor!

0 Likes
Message 7 of 8

nagesh_l
Explorer
Explorer

WHICH VERSION OF INVENTOR YOU ARE USING AND DID YOU CHECK IN THE TEST FILE I SENT, CAN YOU SEND ONE VIDEO IF DONT MIND WHILE RUNNING THE RULE AND GETTING THE AUTOMATIC DIMENSIONS

0 Likes
Message 8 of 8

BM_Ashraf
Advocate
Advocate
Accepted solution

Tested in Inventor 2022

Before 

BM_Ashraf_0-1745496070564.png

 

After running the Rule

 

BM_Ashraf_1-1745496108159.png

 

no changes are done to your files, only the ilogic script is exteneded

If this solved your problem, or answered your question, please click ACCEPT SOLUTION.

Blue Mech

Add-ins for Inventor!

0 Likes