Exporting colors from one flux project to another

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Hi,

 

Is there a way to export the custom defined colors from one Flux2D file to another. This would save time by not requiring to re-do it again in a new project.

Tagged:

Answers

  • plombard
    plombard
    Altair Employee
    edited March 2019

    Hello,

    You can do it by following the next steps:

     - open Flux project

     - in the tree on the left click on [Tools] [Colors] (in fact on the cross in front of the menu) to open the menu with colors

     - click on one color (or more than one, using the CTRL keyboard function to add colors in the same list) (I would recommend to select only NEW colors)

     - then right click

     - then select [Python export]

     - give a name inthe [pyton file] part, for instance colors

     - click on the [OK] button

     - close your current Flux project

     - open the Flux project where you want to import your new colors

     - select the menu [Project] [Command file] [execute in direct mode]

     - select the python file you have generated (for instance colors.py)

     - it will generate your new colors (note: there will be an error if the name of the color is already defined)

     

    I hope it will work on your side.

     

    Another way to do it one by one is the following:

     - select your color in the tree on the left

     - right click

     - selelct [Display PyFlux command]

     - it will display the command to generate the color in the [output] window

     - copy the command (for instance

    Color(name='CYAN_1',

          code=[0,

                0,

                255])


     - then open your second Flux project where you want to create this color

     - paste the lines in the [PyFlux Command] window

     - click on the green arrow on the left

     - it will execute the pyFlux command, and generate this color (without error if the name does not exist yet)

     

    I hope it will help.

    regards

    Patrick

     

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.