Community
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Capture iLogic Drawing Annotation Code Directly from Object

Capture iLogic Drawing Annotation Code Directly from Object

 

The current workflow for adding annotations with iLogic is quite good, but it is not always intuitive how to get the exact result concerning placement, addended text, etc. 

 

It would be outstanding if we could right click on annotations such as dimensions, balloons, etc. and extract the code to add/create them just as they appear on the drawing, something as shown in these images and code examples.

                                                                                                                                                                                                    

                                                                                                                                                                                                    

                                                                                                                                                                                                    

                                                                                                                                                                                                    

                                                                                                                                                                                                    

                                                                                                                                                                                                    

                                                                                                                                                                                                    

                                                                                                                                                                                                    

                                                                                                                                                                                                    

                                                                                                                                                                                                    

 

 

Curtis_Waguespack_4-1738841676158.png

 

 

 

 

 

 

 

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

Dim Face0 = VIEW2.GetIntent("Face0")
Dim Face1 = VIEW2.GetIntent("Face1")
Dim Point1 = VIEW2.SheetPoint(1.2, 0.5)

Dim linDim1 = genDims.AddLinear("Dimension 1", Point1 , Face0, Face1)
linDim1.NativeEntity.Text.FormattedText = "<DimensionValue/> OA"

 

 

 

 

 

 

 

Curtis_Waguespack_0-1738842929628.png

 

 

 

 

 

 

 

Dim Sheet_1 = ThisDrawing.Sheets.ItemByName("Sheet:1")
Dim VIEW1 = Sheet_1.DrawingViews.ItemByName("VIEW1")
Dim Pt1 = VIEW1.SheetPoint(1.4, 0.4)
Dim Face = VIEW1.GetIntent("BBBB", "Face1", 
	intent := PointIntentEnum.kMidPointIntent, nearPoint := Pt1)
Dim balloon1 = Sheet_1.Balloons.Add("Balloon1", {Pt1}, Face)

 

 

 

 

 

 

 

 

 

 

4 Comments
swalton
Mentor

I'd like to extend this idea to any Inventor command.  I find it hard to know where to start when I want to try to automate anything.  If Inventor would translate the UI actions I make into API calls so I can follow along, then it might be easier for a non-programmer like myself to develop custom automation.

Very good idea. My vote you have.

Or kind of code-recorder!

Pav3L
Advocate

I would like something like that.

I think its kind of similar to what I use in Excel, in the developer tab "record macro". It records every user action done in a macro.

Tiffany_Hayden_
Collaborator

I don't know if any of you used the software "Intent" back in the day. But it had something very similar that you could capture code and have it write the code block for you. Very nifty. I vote! 

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

Submit Idea  

Autodesk Design & Make Report