Parameter value strange behaviour

Parameter value strange behaviour

Daan_M
Collaborator Collaborator
223 Views
2 Replies
Message 1 of 3

Parameter value strange behaviour

Daan_M
Collaborator
Collaborator

Hi,

 

I have an Assembly document in which i use a userParameter in my iLogic code.

 

Daan_M_0-1668676243356.png

I reference it by using Parameter("Vermogen") so it doesn't automatically trigger the rule on a change of value.

If Parameter("Vermogen") = 0.55 kW 'Also tried "0,55" and "0,55 kW"
'do something
else
End if

 

 

My code worked before but for some reason it stopped working now, i try figuring out what's wrong by making a rule containing;  MsgBox(Parameter("Vermogen")) and it shows the following when selecting 0,55;

 

Daan_M_1-1668676499911.png

 

IIt shows some random number in the messagebox, what am i missing?


Thanks

 

 

 

 

0 Likes
Accepted solutions (1)
224 Views
2 Replies
Replies (2)
Message 2 of 3

WCrihfield
Mentor
Mentor
Accepted solution

Hi @Daan_M.  I am not familiar with the Units you appear to be using with that user parameter.  What do the units "kW" represent?  It kind of sounds like KiloWatt, which I believe is usually used to measure electrical power.  But Inventor only lists "W" for Watt, or "hp" for horsepower, in the Power units.  If this is the case, iLogic may simply not know how to interpret those units, and may be trying to automatically convert them to some other units.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 3 of 3

Daan_M
Collaborator
Collaborator

You're a champ.

 

This problem arose after i updated my Inventor to from 2021 to 2023 yesterday.

 

1. I changed the unit from kW (kiloWatts) to W(Watts), unfortunatly no change

2. I changed the unit to ul (unitless), this solved the problem

 

After this I checked if it maybe had something to do with my document settings (US imperial vs EU metric), i thought maybe there was some automatic conversion of horsepower to kiloWatts or Watts, but the number still makes no sense.

 

Either way, it is solved 🙂

 

 

 

0 Likes