Hi FlexSim Support Team,
How to add colors in color pallet using code?
Hi FlexSim Support Team,
How to add colors in color pallet using code?
You can find out how FlexSim does it manually. You explore the structure of adding colors to a pallet in the view structure. Here is question dealing with a similar request.
https://answers.flexsim.com/questions/44310/where-to-find-quick-propertie-functions-in-the-tre.html
Hi Brijesh,
Here's a model in which the code inside it looks into a global table for adding a new color into the color palette. The function_s commands were taken from the add color button execution codes. You can refer to those commands to further customize the script as per your requirements.
Table GT = Table("GlobalTable1"); treenode ColorPallet = Model.find("Tools/ColorPalettes/ColorPalette2") for(int k=1;k<=GT.numRows;k++) { function_s(ColorPallet, "addNewColor"); treenode colorNode = function_s(ColorPallet, "getColorNode", k); colorNode.value = GT[k][1]; treenode RValueNode = colorNode.subnodes[1]; RValueNode.value = GT[k][2]; treenode GValueNode = colorNode.subnodes[2]; GValueNode.value = GT[k][3]; treenode BValueNode = colorNode.subnodes[3]; BValueNode.value = GT[k][4]; }
Regards,
Arun KRColorPaletteCode.fsm
6 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved