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?
Solved! Go to Solution.
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,
Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.
Thanks, Curtis! I'm not very good with API, so I think you may over overestimated my gleaning abilities....
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?
This will get you the file path name of an component.
I'm sure there's probably a shorter way too.
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!
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register