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: 

Can I use an iProperty as a Parameter WITHOUT using iLogic?

8 REPLIES 8
Reply
Message 1 of 9
LT.Rusty
1549 Views, 8 Replies

Can I use an iProperty as a Parameter WITHOUT using iLogic?

I know how to get a parameter into my list of custom iProperties, and that's not my issue here.

 

What I want to do is take the iProperty lbmass and add it to the list of user parameters.  Is there any way to do this without using iLogic?

Rusty

EESignature

8 REPLIES 8
Message 2 of 9
mrattray
in reply to: LT.Rusty

I don't think so, but it's a very simple thing to do with iLogic. What's so bad about using iLogic?
Mike (not Matt) Rattray

Message 3 of 9
LT.Rusty
in reply to: mrattray

There's probably nothing inherently bad about iLogic, except that I just don't really have the time to spend learning how to use it. 😛

The last time I really sat down to write a lot of code, line numbers were still mandatory.

Rusty

EESignature

Message 4 of 9
mrattray
in reply to: LT.Rusty

It's a one liner. Make the user parameter you want to hold your mass then add a rule with the following line:

 

myMassParameter = iProperties.Mass

 (Replace "myMassParameter" with whatever you named your parameter to.

 

Go to the Manage tab > Event Triggers and add your rule an event of your choice. This will control when your parameter updates. I like On Save, mself.

Mike (not Matt) Rattray

Message 5 of 9
LT.Rusty
in reply to: mrattray

Thanks.  I'll play with it some.

 

I suspect I'm going to just have to learn how to write iLogic code myself eventually.

Rusty

EESignature

Message 6 of 9
mrattray
in reply to: LT.Rusty

These kinds of things are cake. In fact, you could have pulled that line out of the default snippets folder.
Give it a try, they did a pretty good job of making it user friendly to non-programmers.
Mike (not Matt) Rattray

Message 7 of 9
LT.Rusty
in reply to: mrattray

You sort of missed an important part of the iLogic code ...

it's not "mass = i.Properties.Mass." It's "Parameter("partmass") = iProperties.Mass"


This doesn't look that difficult otherwise, I guess. It's something I probably should start figuring out. Bleh.


Thanks for getting me pointed in the right direction.

Rusty

EESignature

Message 8 of 9
mrattray
in reply to: LT.Rusty

You shouldn't need to use the Parameter("patmass"). The only time you need that is if you're using an external rule. Does mass = i.Properties.Mass not work for you?
Mike (not Matt) Rattray

Message 9 of 9
LT.Rusty
in reply to: mrattray

I'm using an external rule.

 

I've added the trigger in to all my templates, but because I've got a lot of documents that are older than the templates I'm using and I want to be able to run this on those parts as well, I've set it up as external.

Rusty

EESignature

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

Post to forums  

Autodesk Design & Make Report