First lets make this clear... "I am not a programer", so if responces could be made simple (very simple) I would appreciate it.
That said...I have been looking over the API chart to figure out how to code something in an iPart. It looks like I should be able to (if I understand correctly) code it so it reads the "iPart factory" the "table row" then the "table cell". But what I don't understand is how the syntax is used and/or what syntax to use.
I am trying to use a bit of iLogic to auto fill in the “Title” for the iPart model, that way I type the info once and not 2 times per size change.
What I am trying to do is to pull the part number from the iPart table that I have already created and have the code read the cells in the table that contains the part numbers and if it is = to a certain number, then the out should change the Title according to what part number is in the cell that gets read.
I hope this makes sence… if not I could make a short video that may make more sence.
Solved! Go to Solution.
Solved by swordmaster. Go to Solution.
Well ok but the way I read it.
I am trying to use a bit of iLogic to auto fill in the “Title” for the iPart model, that way I type the info once and not 2 times per size change
But I am also lost after giving up on why after reading it all still find all can be done in ipart.
I don't see any reason for excel but carry on...
I agree iLogic isn't needed at all.
If you create an iPart you're using Excel, even if you don't actually open it up in another window. That's why Excel is required to be installed on your machine with Inventor in order to use iParts. All Swordmaster did was edit the iPart table in Excel instead of the crappy Inventor table editor, where more robust options were available.
The idea of making this "smart" is sort of like why you would want to use one dimension and a symmetry constraint rather than two identical dimensions.
Oh ok if thats the case ok but the way I was reading he wanted ilogic to find a cell named title match it with his ipart table name part number to fill in the iproperties Title.
When the ipart can have a colunm in the table itself.
But my reading is not the best yet working on it......
Let me re-fraze......
How do I now get the cell info to populate the "Title" in the Project dialog tab in the iProps?
First thing you need to do is to add the Title iproperty to your ipart table using the ipart author interface
open the ipart table
select the iproperties tab
expand the + next to the Summary tab
use the >> button to create the Title column
save and close the interface
open the table again using excel
add the code in the cells in the title column
Well now that I am back in the drivers seat (after being ill and playing catch-up) I just wanted to say thanks to all who helped to figure out and understand what I needed to do.
@Swordmaster
I have been working on your excel suggestion. The problem I am running into is the fact that when I use the formula for combining the different colums in the "Description" colum it truns the colum red in the table inside of inventor.
See pic : http://screencast.com/t/anUtMqeI3FOx
Also, when I switch from part to part it gives me an error that looks like this...
See pic : http://screencast.com/t/tDLEEEMGlKYf
Basicly it wants to reformat the output from...
7Ga x 12-1/8 x 16-1/8 to 7Ga X 12 1/8 X 16 1/8
Not sure why.
The description turning red in the ipart author table is expected behavior. The color is used by Inventor to flag that the value is controlled by a excel formula
ok... I thought that might be the case, but I thought it would be a different color since red usually means ER-ROR ER-ROR DOES NOT COMPUTE...
Well, after alot of help from the Techs @ Autodesk I finally got the material description part of things ironed out...
When I was trying to use excel to manipulate the out out I kept getting capitalized letters and the numbers and spaces with no hyphen inbetween (ie. 7 1/2 X 3 1/2) which is very close to what I needed but not quite.....So with the gurus @ Autodesk giving me a hand they came up with this all iLogic code that gave me the prorper out put...
Dim partDoc As PartDocument = ThisDoc.Document
partDoc.ComponentDefinition.SetEndOfPartToTopOrBottom(True)
iProperties.Material = "Steel, Mild"
iProperties.PartColor = "Steel"
On Error Resume Next
iProperties.Value("Project", "Description") = SheetMetal.GetActiveStyle() & " x " _
& RoundToFraction(SheetMetal.FlatExtentsWidth, 1/64, RoundingMethod.Round).Replace(" ", "-") & " x " _
& RoundToFraction(SheetMetal.FlatExtentsLength, 1/64, RoundingMethod.Round).Replace(" ", "-")
partDoc.ComponentDefinition.SetEndOfPartToTopOrBottom(False)
iLogicVb.UpdateWhenDone = True
Thanks a bunch SWORDMASTER & the TECHS @ Autodesk
I hope this helps someone else as well.....
I figured out that I could do the title info by adding the "Title" from the "properties tab" summary and entering the info in the created column. I wish I had tought of this sooner.