Inventor General Discussion

Valued Contributor
Posts: 69
Registered: ‎05-26-2010
Message 1 of 5 (1,060 Views)
Accepted Solution

iLogic access to Filename iProperty

1060 Views, 4 Replies
10-13-2011 10:23 AM

I am trying to use the iProperties.Value("part1", "Summary", "iProperty") function to get the filename or complete filepath of a component within a subassembly. I know that these iProperties exist because I can insert them onto a drawing, and I see them in the general tab of the iProperty window.


However, when I try something like:


filename = iProperties.Value("part1", "General", "Filename")


I get an error message indicating that the General tab can't be found. How might I go about getting this filename iProperty, or is there an easier way?

*Expert Elite*
Posts: 2,825
Registered: ‎03-08-2006
Message 2 of 5 (1,050 Views)

Re: iLogic access to Filename iProperty

10-13-2011 11:24 AM in reply to: SteveX82


Hi SteveX82, 


I did a lot of this in this example:


I think you should be able to glean what you need from there.


Also, you might find more information on customization and ilogic over here as well:


I hope this helps.
Best of luck to you in all of your Inventor pursuits,



  solution.png  Did you find this reply helpful ? If so please use the Accept as Solution or  Kudos button below.

Valued Contributor
Posts: 69
Registered: ‎05-26-2010
Message 3 of 5 (1,024 Views)

Re: iLogic access to Filename iProperty

10-14-2011 04:58 AM in reply to: Curtis_Waguespack

Thanks, Curtis! I'm not very good with API, so I think you may over overestimated my gleaning abilities.... :smileyvery-happy:


I've stumbled across a couple of examples of code (including your's) that retrieve component filenames, but they all seem to loop through all components in an assembly to do so. Is there a way to use something like the "FullFileName" code, but attach it to a single, specific component in the browser instead?


I've stabilized all of my browser names, and all I want to do is have a single line of code similar to:


filename = Component.InventorComponent("block1").FullFileName 


I can see the component filename is a half-dozen locations, but does iLogic lack a simple way to capture that filename and throw it into a string parameter?

Valued Mentor
Posts: 316
Registered: ‎04-14-2005
Message 4 of 5 (1,020 Views)

Re: iLogic access to Filename iProperty

10-14-2011 05:53 AM in reply to: SteveX82

This will get you the file path name of an component.




 I'm sure there's probably a shorter way too.

Valued Contributor
Posts: 69
Registered: ‎05-26-2010
Message 5 of 5 (1,016 Views)

Re: iLogic access to Filename iProperty

10-14-2011 06:12 AM in reply to: rjay75

That's exactly what I was looking for. I figured I was just missing a few words from my code, but I had no clue what to add.


Thanks again to both of you!

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community

Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor