Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic material update

15 REPLIES 15
SOLVED
Reply
Message 1 of 16
m.hermann
2225 Views, 15 Replies

iLogic material update

Smiley Embarassed

Hi,

i use this code in a small form:

MultiValue.List("Material")=iProperties.Materials'
iProperties.Material=Material
iProperties.Value("Custom", "Material")=Material

that works fine, the material change is correct.

But if i change the material from the apperentice browser my iLogic form displays only the material from fxParameter, means

there is no update.

How can I fix this?

thx

Michael

15 REPLIES 15
Message 2 of 16
ChristinaForest
in reply to: m.hermann

hi!

 

I dont have a same version of inventor, but i think the problem is this line of code? delete them

iProperties.Material=Material
Message 3 of 16
m.hermann
in reply to: ChristinaForest

Hi, thank's for your answer
no, this line is needed, nothing works without that only the material browser is not beeing updated and if i Change am material from the browser, my ilogic has the 'old' material
Message 4 of 16
ChristinaForest
in reply to: m.hermann

With your rule it's the user parameter who control your material, what do you want to make?

Message 5 of 16
ChristinaForest
in reply to: m.hermann

do you add a event triggers of your rule if material change?

Message 6 of 16
m.hermann
in reply to: ChristinaForest

Hi,

yes i added triggers. I attached the document and a document with screenshots.

If i change the material from browser, my iLogic displays the former material. I think i need to update the fxParameter but how?

(sorry for my bad english)

Message 7 of 16
ChristinaForest
in reply to: m.hermann

i use inventor 2013 😞 i cant open your file

Message 8 of 16
m.hermann
in reply to: ChristinaForest

Inventor 2013

Message 9 of 16
m.hermann
in reply to: m.hermann

Spoiler
 

 

Hello everyone,

 

is there anybody who knows a solution for my problem?

PLS help.

Message 10 of 16
ChristinaForest
in reply to: m.hermann

MultiValue.List("Material") = iProperties.Materials
MyMaterial = Material
iProperties.Value("Custom", "Material") = MyMaterial
iProperties.Material = MyMaterial
iLogicVb.UpdateWhenDone = True

Message 11 of 16
m.hermann
in reply to: ChristinaForest

Hi,

thx for your quick help. That works not bad but:

 

now i'm only able to change the material from my iLogic or fxParameter. Not in phys. Property and not in

Material browser.

How can i fix it that i can change the material everywhere?

Message 12 of 16
ChristinaForest
in reply to: m.hermann

add Material rule to the event triggers "Any Model Parameter Change"

Message 13 of 16
ChristinaForest
in reply to: m.hermann

For what do you use a form???

Message 14 of 16
m.hermann
in reply to: m.hermann

I know what you  mean, do it in this way or do it in the other way but not mix it !?

We use the form to make all necessary iProperty inputs (20) and change the material in one way. In the form we display also the

weight, so we change the material if we get the correct weight.

When the input is done sometimes it happens that someone has to change the material without the form (its faster), or we have to

control the physiks, so we change the material in the iProperty.

Message 15 of 16
ChristinaForest
in reply to: m.hermann

i have maybe a solution for you, try this

Message 16 of 16
m.hermann
in reply to: m.hermann

Hi,

yes that's it. It works very fine.

Many thank's.

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

Post to forums  

Autodesk Design & Make Report