question

Mischa Spelt avatar image
0 Likes"
Mischa Spelt asked Jordan Johnson answered

applyChangesToSelected and module classes

Hi,

While (finally) trying to implement the quick properties panels for FloWorks I found that the applyChangesToSelected function at does not work with modules.

It’s about the code in VIEW:/standardviews/modelingutilities/QuickProperties>eventfunctions/applyChangesToSelected. I tried to use it with a FloWorks::BasicCO.

On line 11, the className gets assigned the name of the BasicCO object in the library, which is just “BasicCO”.

Subsequently the isclasstype check on line 20 fails for all selected objects, because the objects are “FloWorks::BasicCO” and not “BasicCO”.

Would it be an option for you to change line 11 of that code from

className = getname(highlightedObjClass);

to

className = getname(first(classes(highlightedObjClass)));

Or would there be an alternative solution? Thanks.

FlexSim 17.2.1
module sdk
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered

We have worked around this issue in other modules. I recommend investigating the EditMaxAllocations field on the AGV Control Point. This field implements its own applyToSelected logic. Here's the path to that node in the view tree:

views().find("standardviews/modelingutilities/QuickProperties>variables/propertiesPanels/Control Point/Control Point/EditMaxAllocations>eventfunctions/applyToSelected")
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.