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: 

access sketches and features information

6 REPLIES 6
Reply
Message 1 of 7
joao.av.c
613 Views, 6 Replies

access sketches and features information

Hello,

 

 

- when modelling a part file in Inventor, only the dimensions we set (dimensions we give a name and a value), are listed in the parameters table. This way, its possbile to export the information listed in that table. 

- the information listed in the parameters table is based on sketches and features dimensions, as obvious.

 

So , my question is: is it possible to access the information (dimension values) contained in a feature (or a sketch) without setting a specific name or value to it?

 

For example, in the attached pictures, if a rectangular form is drawn and the dimensions are setted, these will be lisetd in the parameters table (see attached  "pic1" and "pic1 - params").

But, in the other hand, if the same rectangular form is drawn, but this time without setting any dimension, the parameters table will be empty, obviously (see attached  "pic2").

 

After this, i can surely presume that Inventor saves or keeps this information somehow, somewhere, without having to set dimensions or values.

 

So, my question is: is it possible to access sketches and/or features information without setting this values?

I hope i have explained my doubt correctly, if not, let me know!

 

 

My best regards, 

JVC

6 REPLIES 6
Message 2 of 7
nmunro
in reply to: joao.av.c

Yes, you can get either the entities in the sketch and extract information about their length, radius, etc. Likewise, you can get the resulting face in the solid and extract the same type of information from the face, its edges, or other types of geometry that can be inferred from it. There are quite a few samples in the help system that cover these concepts.

 

        


https://c3mcad.com

Message 3 of 7
joao.av.c
in reply to: nmunro

Hi, thank you for your answer.

 

So, where can i find these samples ? Where are they located, in inventor's help system or autodesk foruns' ?

Message 4 of 7
santoshr0114
in reply to: joao.av.c

You can access the part parameters of the part component using 

ThisApplication.ActiveDocument.ComponentDefinition.Parameters

Or

 

Dim pDoc as PartDocument
pDoc.ComponentDefinition.Parameters

 

You can loop through each parameter and get all the values in a datagridview.

 

Few examples are there in "C:\Program Files\Autodesk\Inventor 2012\SDK\DeveloperTools\Samples" but i am not sure whether you will find the type of sample you are looking for ...!

 

I got help from the Autodesk Forum, search here you might get what you require..

Regards
Santosh
Message 5 of 7
joao.av.c
in reply to: santoshr0114

Hi,

 

I already know how to access the parameters list and export them into an excel spreadsheet.

 

What I wanted to know, as I explained before, is to access sketches and features information without setting dimension values and so. . . 😕

 

I went to <C:\Program Files\Autodesk\Inventor 2012\SDK\DeveloperTools\Samples>, and I only have and html hel file named "SDK_Readme" ! I currently have Inventor 2013: the samples are in another path ?

 

 

Thank you,

JVC

Message 6 of 7
joao.av.c
in reply to: joao.av.c

Any help ?  Smiley Indifferent 

Message 7 of 7
jdkriek
in reply to: joao.av.c

It's very specific, not a good way to get everything

 

Say you want the length of the first line in a sketch with no dimention, it would look like this:

 

pDoc.ComponentDefinition.Sketches("Item 1").SketchLines("Item 1").Length

 But then say you want the radius of the first circle in a sketch with no dimension, it would look like this:

 

pDoc.ComponentDefinition.Sketches("Item 1").SketchCircles("Item 1").Radius

Of course you could loop through all the sketches, then loop through all the SketchLines, then loop through all the lengths, but then you would also have to loop through all the SketchCircles and then all the Radius under that. Anything else you would want to display would most likely require it's own loop if you are wanting to display everything.

Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


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

Post to forums  

Autodesk Design & Make Report