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: 

Sketched Symbol Range Box

1 REPLY 1
SOLVED
Reply
Message 1 of 2
johnster100
518 Views, 1 Reply

Sketched Symbol Range Box

Hi,

I'm writing a sub to add sketched symbols to a batch of drawings. The symbols in this case will be tables. I would like to give the option to add them to the title block. 

 

My issue is that I won't know when the connection point is in the symbol (could be in the center or in one of the corners of the symbol), Is there a way to get this information and it's position in respect to the symbols (i.e get the insertion point location and Max Point and Min Point for the symbol)?

 

thanks,

John 

1 REPLY 1
Message 2 of 2
WCrihfield
in reply to: johnster100

Just checking...You know you can specify where the InsertionPoint is within a SketchedSymbolDefinition, when you're editing its sketch manually, right?  And that if you do not set it, it will use the center point of the geometry by default?

If need be you could just edit the definitions of the SketchedSymbolDefinitions you want to use, then set the insertion point where you want it to be.  Then when you insert it by code, it will always use that position within the SSD when placing it.

I don't believe the functionality is there yet to set the insertion point by code, other than to do a SelectSet.Select and add a specified SketchPoint (or other defined location within the sketch) to that selection, then execute the CommandManager command for "Set Insertion Point Grip".  The definition would most likely have to be in Edit mode for it to work though.

I don't know of a way to retrieve that insertion point later though.  I don't know of a property assigned to any sketch entities that sets/gets a boolean indicating whether it is set as an insertion point.

Since there doesn't seem to be a RangeBox property for DrawingSketch objects, but there is for the different types of entities within the DrawingSketch, you would most likely have to loop through each sketch entity, then to its RangeBox, add the Min & Max values of its RangeBox into two seperate lists (Min list & Max list), then do a MinOfMany and MaxOfMany to get the equivalent of the results of the RangeBox for the DrawingSketch.

I hope this makes sense to you.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

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

Post to forums  

Autodesk Design & Make Report