Model States, iProperties & Functions

Model States, iProperties & Functions

NachoShaw
Advisor Advisor
1,430 Views
6 Replies
Message 1 of 7

Model States, iProperties & Functions

NachoShaw
Advisor
Advisor

Hey

 

Im not complaining (well, mildly).. The more i use Model States, the more i see it hasnt been thoroughly thought about. Model States were the keynote feature in 2022 release and why shouldnt I be a little frustrated? After all, i pay a lot for my license so i should be getting something for the money right?

 

Anyway, soapbox to one side

 

I have created a set of model states to provide different versions of a component but it appears that Model States iproperties cannot work with function iProperties.

error.jpg

That means the intention to use MS for a range of component updates will now go by the wayside.. I use a lot of function iProperties as its much more efficient than using code but the lack of operability puts model states yet another item on a list of new features that dont work 100%.. That list also contains 3D annotations, parameters that are not numeric and so on.

 

There is a Q & A next week on facebook Inventor group with @johnsonshiue, My list is getting longer 🙂

 

Thanks

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


1,431 Views
6 Replies
Replies (6)
Message 2 of 7

johnsonshiue
Community Manager
Community Manager

Hi Nachito,

 

I hear you and I understand your frustration. I wish all the Model States requests were fulfilled. And, all workflows are straightened out. Unfortunately, we have constraints. The team did the best it could to deliver the workflows in a useable way. The best may not be good enough. Not ideal for sure.

Regarding iProperties, think of Model States as a table. The table captures the exact property, parameter, and feature compute values. The property expression function is workflow within iProperties dialog. Such expression may not be recognized by the Model States table.

Please feel free to share an example here. It might be a bug that I am not aware. I would like to understand it better.

Many thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 3 of 7

CStilesCARE
Advocate
Advocate

@NachoShaw 

At this moment, it looks like the Model States table still doesn't support iProperties with expressions.

It's been a little while since your post, so you may have discovered this on your own, but I found a workaround that you might be able to use in some cases at least (though it may not be practical in all cases).

 

The table doesn't support expressions, so any iProperties that need to use them will have to use the same formula for every state (to keep it out of the table). To get around that limit, you can create 1 (or more) custom iProperties to act as containers for the different sections of your final output, then reference them in the main iProperty expression. You can then use the Model State table to control what those sections say (if it's direct text/numbers) or keep them as a set expression too (so they are also kept out of the table).

 

So, for example, the main iProperty expression might be "=<Title> - <CustSize> Type:<CustType> (<CustAltType>)". This never changes, so it's not controlled by the table.

In this case, we'll say "CustSize" is always "=<LENGTH> x <WIDTH>". It also never changes, so is kept out of the table.

"CustType" can be "Round", "Square", or "Oblong". These are all direct text (no expression), so we can control it in the MS table.

"CustAltType" can be either "Thin" or "Thick", also direct text, so we can control this in the MS table too.

 

A bit long-winded, but hopefully what I said makes sense!

Message 4 of 7

NachoShaw
Advisor
Advisor

Hey

 

Yes that makes sense and thanks for sharing. Yet another 'feature' solution resolved outside of the inventor team...

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


0 Likes
Message 5 of 7

wvoet
Enthusiast
Enthusiast

I know this post is a little old but I believe I have found a solution.  Before editing the iProperties to include a function, make sure the edit scope status (circled below) is set to Edit Factory Scope.

wvoet_1-1684238077432.png

Then go into the iProperties and add your function.  At this point you should be able to switch the edit scope status back to Edit Member Scope if desired. 

 

 

Message 6 of 7

CStilesCARE
Advocate
Advocate

Hey @wvoet !

 

Thanks for adding the extra info in here. That trick is super useful when you want to change something and have it affect ALL model states at the same time, instead of just the active one. It's very important so you don't have to do the same work multiple times for each state!

 

In this case though, the problem OP was having is due to the fact that the internal "model states" functionality doesn't recognize expressions/formulas in iProperties (parameters are fine though). It just sees strait text or numbers and enters that directly.

 

For an example, this means that you cannot have one MS with the description set as "=<Width> x <Length>", then have another MS with it changed to be "=<Width> x <Height>".

The MS table doesn't "see" the expressions, just that the final result is different from before, and so IV will generate a pop-up asking if you want to overwrite the iProperty (which will get rid of the expression and is really annoying).

 

Currently, the only workaround I've found so far is as I described in my first answer above. A bit of extra work, but totally doable in many situations.

0 Likes
Message 7 of 7

wvoet
Enthusiast
Enthusiast

You are correct, that it does not work if want the formula to change for different model states.  But it does seem to work if the expression stays the same for all model states.

0 Likes