Semi-Table-Driven iFeature

Semi-Table-Driven iFeature

Anonymous
Not applicable
1,022 Views
9 Replies
Message 1 of 10

Semi-Table-Driven iFeature

Anonymous
Not applicable

I have a number of iFeatures to create that are more complex versions of the attached part. There are a round part and a square part, and the square and round dimensions don't follow a relationship that I can enter as a simple formula so I want them to be entered by selecting a row out of a table. I want to also be able to have the user input a length that is not table-driven. If possible, I'd also like to have the row of the table selected from a list of names, not numbers. I.e., I want to have a list including "Size A", "Size B", etc. instead of selecting "1.25 in", "1.50 in".

 

Has anybody done what I am trying to do? Is there a better workaround than creating separate iFeatures for each size? Thanks in advance.

Accepted solutions (1)
1,023 Views
9 Replies
Replies (9)
Message 2 of 10

mwighton
Collaborator
Collaborator
Make a user parameter, with a list of names that you want to be able to chose from. Then write an ilogic code that will apply the desired dimensions to the desired selection from the list. Add that rule to a form and thats about it.

You can also use ilogic for the non-tabulated user input and put that in the form.
Did this post help out? Hope it did.
If so please use the 'Accept as Solution' or 'Kudos' Button below.
God Bless

Mwighton
0 Likes
Message 3 of 10

mcgyvr
Consultant
Consultant

Why complicate it?

If your ifeatures are so different that they can't be done in a table/formula then just group the like ones as best you can and do an ifeature for each similar group.

 

Hard to give good information though by just seeing one simple part... and not knowing at least a bit about these varying features..

 

But to me just keep it easy.. same reason that every possible nut/bolt/fastener/plumbing fitting/wheel/bearing/hook/clevis,etc... in the world isn't just created in just 1 ipart factory.  Group what you can and use multiple ifeatures.  



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
0 Likes
Message 4 of 10

mwighton
Collaborator
Collaborator

Something like this...

Did this post help out? Hope it did.
If so please use the 'Accept as Solution' or 'Kudos' Button below.
God Bless

Mwighton
0 Likes
Message 5 of 10

Anonymous
Not applicable

@mwighton wrote:
Make a user parameter, with a list of names that you want to be able to chose from. Then write an ilogic code that will apply the desired dimensions to the desired selection from the list. Add that rule to a form and thats about it.

You can also use ilogic for the non-tabulated user input and put that in the form.

 

This is how I have the parts now, and it's great. Easy and foolproof. Is there a way to put the iLogic into the iFeature? Because that would make life easy. I can't open your attachment, I get "error reading rse stream" which should be from me being on 2014 and you being on a newer version.

 

mcgyvr, I'm asking because here, if a solution's not dead simple it's not going to get used. If it was just me I would be satisfied, but I hear a lot of "it's too confusing, I can't use it, walk me through it again please" if I try to give the other users a tool that's not 100% easy to set up and use. Plus I might learn something new if I reach out to the forum!

0 Likes
Message 6 of 10

mwighton
Collaborator
Collaborator

Since you have an older version i will attach my code and you will have to make the rules yourself.

 

Create a User Parameter called "Selection" and make it a multi-variable list with the following Items

List:

Big

Medium

Small

User

 

Next

 

Go to Manage->iLogic->Add Rule

 

Code 1:

SyntaxEditor Code Snippet

If Selection = "Big" Then
    Round = 6
    Length = 6
    Square = 4.5
Else If Selection = "Medium" Then
    Round = 4
    Length = 4
    Square = 3
Else If Selection = "Small" Then
    Round = 2
    Length = 2
    Square = 1.5
Else If Selection = "User" Then
    iLogicVb.RunRule("Override")
End If
iLogicVb.UpdateWhenDone = True

Code 2:

 SyntaxEditor Code Snippet

Parameter("Round") =InputBox("Enter Diameter", "Diameter", "Diameter")
Parameter("Length") =InputBox("Enter Length", "Length", "Length")
Parameter("Square") =InputBox("Enter Square", "Square", "Square")

iLogicVb.UpdateWhenDone = True

Remeber each Code represents a separate rule.

 

Next

Go to Manage->iLogic->iLogic Browser

 

A tab or window will open. Go to the Forms tab and right click-> add form

 

Name it whatever you want.

drag and drop the user parameter 'Selection' into the box on the right. I like to have the buttons set up as 'ok cancel apply'(For this click the main form tab and scroll down to predefined buttons and select okcancelapply)

 

attached are some pics to help you out.

Did this post help out? Hope it did.
If so please use the 'Accept as Solution' or 'Kudos' Button below.
God Bless

Mwighton
0 Likes
Message 7 of 10

mwighton
Collaborator
Collaborator
you can make the multi-variable list using the ilogic and save is as an external rule so you can use it any file.
Did this post help out? Hope it did.
If so please use the 'Accept as Solution' or 'Kudos' Button below.
God Bless

Mwighton
0 Likes
Message 8 of 10

Anonymous
Not applicable

Mwighton, thanks for all the work you've put into answering my question. The solution you describe is great when it can be used, but in my case it has to be an iFeature. It seems that I can't package iLogic with an iFeature, which is the key here. I don't see external rules being useful here because they would add a lot of complexity to the use of the iFeature and remove much of the "automaticness" from it, if iLogic can even edit the unexposed parameters of an iFeature.

 

We often have complicated parts that we need to add a complicated end to, and right now we model the end onto the base manually each time. So, while we already have automated ends in some commonly-used templates what I'm trying to make is specifically an iFeature. I've tried making an end part and using Derive to put it where it needs to go, but it's too crude of a solution overall to be viable.

 

For what it's worth, I have found some success using stepwise formulas. For example, if sizes A; B; C are 1.25x1.75; 35mm x 50mm; 1.50x2.00, I can make the round formula as follows to make just one variable control as if there were a table:

Round = 1.75 in + (50 mm - 1.75 in) * floor(Square, 35 mm) + (2.00 in - 50 mm) * floor(Square, 1.50 in)

But, this solution gives me a length input and a drop-down of Round sizes, NOT a length input and a drop-down of name strings. As you can see, I'm really looking for the last ounce of intuitivity. Not to mention, there's some pretty intense data entry and debugging involved to get that solution working on ends with large design tables.

0 Likes
Message 9 of 10

johnsonshiue
Community Manager
Community Manager
Accepted solution

Hi! I don't think iFeature currently offers the level of customization you are looking for. Some can be done but some require new enhancements. It seems that you might need to use iLogic rule and form to do that.

There is another way to do this type of workflow. Here is what you can try to do.

1) Open the part and go to Parameters table -> right-click on Length for example -> Make Multi-Value -> add more values to the list.

2) Save it as a new source part.

2) Start a new part -> Derive -> pick the new soure part -> derive it as a new solid body.

You can use Direct Edit command to reposition the body. Then if it needs to join with existing body, simply use Combine command to merge the bodies.

 

The nice thing about this workflow is that the source part remains a part. There is no extraction required. If you do need to insert it as features, you can simply multi-select the features in the source part -> Copy -> Paste to the new part. The pasted features should behave as if they were recreated manually.

Thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 10 of 10

Anonymous
Not applicable
It looks like copy/paste is as close as I can get. I can keep the iLogic and still insert as a feature. Thanks for all the help, everyone.
0 Likes