Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic & the API

31 REPLIES 31
SOLVED
Reply
Message 1 of 32
Breeze104
1235 Views, 31 Replies

iLogic & the API

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.

31 REPLIES 31
Message 2 of 32
swordmaster
in reply to: Breeze104

you cannot use ilogic within a ipart.

If i was trying to do this I would edit my ipart table using excel and "build" the description using the inbuilt excel commands

CONCANTENATE will do most of what you want i believe

Inventor 2010 Certified Professional
Message 3 of 32
Breeze104
in reply to: swordmaster

OK...???

Now I am really lost.  So your saying I can use iLogic in an .ipt but not if it is an iPart??

 

What is "CONCANTENATE"

Message 4 of 32
jletcher
in reply to: swordmaster

Sword you can use ilogic with iparts you are just limited to what you can do.

Message 5 of 32
jletcher
in reply to: Breeze104

Breeze

 

 It all depends on what you want because what you may be asking can be done within the ipart itself I just need a better understanding. Because the title can be included in the ipart itself so I will need to understand why you would need ilogic to change the title when it can be changed within the ipart.

 

Smiley Happy

Message 6 of 32
SBix26
in reply to: Breeze104

CONCATENATE (note spelling correction!) is an Excel function that concatenates the contents of a list of literal strings as well as the contents of specified cells.  In plain english, it puts characters together in one string from various sources specified in the list (up to 255 items!).

Message 7 of 32
Breeze104
in reply to: jletcher

The reason for the Title change is because, in the iPart I have 4 pairs (R &L) of 3 different sized parts so one has to read like this..."8" Outer Trans. Box Side" another "10" Outer Trans. Box Side" another "10" Inner Trans. Box Sideand the last "12" Inner Trans. Box Side".

 

All of these parts are very similar just the over all size is different.  We have 60-70% of our parts like this, so if I could figure out a good way around the Title issue it will make creating the dwgs for all these parts easier.

 

And easier is better...Right..???  Smiley Surprised Smiley LOL

 

Message 8 of 32
mrattray
in reply to: Breeze104

I have to agree with the earlier posters, Breeze. iParts and iLogic don't play well togther. This should be pretty easy to do in excel, and since their iParts, you already have an excel sheet controlling them. Just add the description property to your ipart sheet, then edit the sheet in excel and use the excel functions (help on this should be readily available anywhere) to automate your part number.

It will be easier and more robust then trying to force iLogic to cooperate with your iparts.

Mike (not Matt) Rattray

Message 9 of 32
swordmaster
in reply to: jletcher

True, You can control a ipart with ilogic, ie switch between members, suppress etc. However you can do very little within the ipart members Bruce Sword Autodesk Inventor 2010 Certified Associate Autodesk Inventor 2010 Certified Professional -------------------------------------------------------------------------- CONFIDENTIALITY NOTICE: The information in this e-mail message, including all replies or forwarded messages connected herewith, is confidential, may be legally privileged, and is intended only for the use of the intended recipient(s). If you, the reader of this message, are not an intended recipient hereof, you are hereby notified that you should not further disseminate, distribute, or forward this e-mail message. If you have received this e-mail message in error, please notify the sender as soon as possible by return e-mail message or by telephone at (601) 425-3151. In addition, please delete the erroneously received message and any reply from your system and any device/media where the message is stored. --------------------------------------------------------------------------
Inventor 2010 Certified Professional
Message 10 of 32
Breeze104
in reply to: mrattray

Would it make sence to create a text multi parameter that has a list of the text I want to use? Then creat another text param. that has my part numbers in it and then use those to fill in my Title based on the part numbers like I wanted to?

 

Or is this to redundant?

Message 11 of 32
swordmaster
in reply to: Breeze104

Attached is a workbook showing how the cocatenate function (excel 2000)

In the example i "build" the description using the length, width and height cell values plus other text.

Once the description cell is populated  you can drag the conntents to the other rows and they will adjust automatically

 

Inventor 2010 Certified Professional
Message 12 of 32
swordmaster
in reply to: Breeze104

no that's way too complicated for what you are trying to achieve

Inventor 2010 Certified Professional
Message 13 of 32
Breeze104
in reply to: swordmaster

The example in the excel file shows you pulling from the numbered cells and combing them.  What I am trying to do is only reference the part number cell and have the description change.

 

So when I select.....8TAD 150-3(R or L) the Project Title box is populated with... 8" Outer Trans Box Side"

Then when I select.... 10TAD 150-3(R or L) the Project Title box is populated with... 10" Outer Trans Box Side"

and so on...

 

It may be that I am not getting the gist of the excel command, but to me it looked like it was combining the cells not referencing.

 

I had to dump ALL Autodesk software and install a new one today...so as soon as I get things reinstalled I will make a video that might help.

Message 14 of 32
swordmaster
in reply to: swordmaster

does the amended spreadsheet attached do what you want?

Inventor 2010 Certified Professional
Message 15 of 32
Breeze104
in reply to: swordmaster

Yes that is it.......But could you make the text bigger?

 

 

Just kidding

LOL

 

Is there a non-engineer explanation for what you did, because I looked at the formula and it made nosence to me.

 

Also, now that I have this piece of grand excel-ism how do I use it?

Message 16 of 32
swordmaster
in reply to: swordmaster

okay, here goes:)

Lets look at the cell with the value 8, the code in the cell reads

=IF(LEN(A10)<12,LEFT(A10,1),LEFT(A10,2))

What this is doing is looking at the length(number of characters)  of the string in cell A10 (8TAD 150-3R)  using the LEN function

if the number of characters is less than 12 it gets the first character reading from the LEFT of the string

otherwise  (number of characters is greater than 12) it gets the first two characters reading from the LEFT

 

The description cell uses the CONCATENATE function to get the value described above and then appends "Outer Trans Box Side"

 

To use this in your ipart

Choose edit table using spreadsheet

add a column to  and add the same excel code (you will have to change the cell references) to get the first character(s) of the description

Then add the CONCATENATE code to the description column

I have attached a simple example (INV 2009)

Inventor 2010 Certified Professional
Message 17 of 32
Breeze104
in reply to: swordmaster

I see said the blind man to the deaf mute......

 

I would never have thought to use a character count......I guess that's y u are the GURU... Smiley LOL

 

I understood what it was going to take to put this into excel.... What my question should have said is....How do I get this info into iLogic.  I have tried in the past to pull cell info but had no success.

Message 18 of 32
swordmaster
in reply to: Breeze104

No ilogic used in this solution Bruce Sword Autodesk Inventor 2010 Certified Associate Autodesk Inventor 2010 Certified Professional -------------------------------------------------------------------------- CONFIDENTIALITY NOTICE: The information in this e-mail message, including all replies or forwarded messages connected herewith, is confidential, may be legally privileged, and is intended only for the use of the intended recipient(s). If you, the reader of this message, are not an intended recipient hereof, you are hereby notified that you should not further disseminate, distribute, or forward this e-mail message. If you have received this e-mail message in error, please notify the sender as soon as possible by return e-mail message or by telephone at (601) 425-3151. In addition, please delete the erroneously received message and any reply from your system and any device/media where the message is stored. --------------------------------------------------------------------------
Inventor 2010 Certified Professional
Message 19 of 32
jletcher
in reply to: Breeze104

I am still lost why you are using a spreadsheet the title can be changed with your ipart table..

Message 20 of 32
mrattray
in reply to: jletcher

He is using the iPart table, he's just editing the table in Excel to take advantage of Excel's funcionality.

Mike (not Matt) Rattray

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

Post to forums