Start up and Configuration/fr

Cette page montre, les différentes façons de lancer FreeCAD, et, ses configurations les plus importantes.

Démarrer FreeCAD en ligne de commande
FreeCAD peut être lancé normalement, en double-cliquant sur son icône qui est sur le bureau, ou, en le sélectionnant dans le menu de démarrage, mais, il peut également être lancé directement à partir de la ligne de commande. Cela vous permet de changer les options de démarrage par défaut SOEM.

Les options disponibles en ligne de commande
Les options en ligne de commande sont l'objet de fréquents changements, il est donc sage de vérifier les options de votre version courante en tapant : FreeCAD --help Les réponses disponibles, sont dans les paramètres : Usage: FreeCAD [options] File1 File2 ..... Allowed options: Generic options: -v [ --version ]     print version string -h [ --help ]        print help message -c [ --console ]     start in console mode Configuration: -l [ --write-log ] arg   write a log file -t [ --run-test ] arg    test level -M [ --module-path ] arg additional module paths -P [ --python-path ] arg additional python paths --response-file arg      can be specified with '@name', too

"Response" fichiers de configurations
Vous pouvez lire certaines options de FreeCAD à partir d'un fichier de configuration. Ce fichier doit être dans le répertoire /bin et doit être nommé FreeCAD.cfg. Notez, que les options spécifiées en ligne de commande, remplacent le fichier de configuration !

Certains systèmes d'exploitation ont une limite assez courte de la longueur de la chaîne, en ligne de commande. La façon courante de contourner ces limitations, est l'utilisation des fichiers de Response. Un fichier de Response n'est qu'un fichier de configuration, qui utilise la même syntaxe qu'a la ligne de commande. Si la ligne de commande spécifie un nom de fichier de Response à utiliser, il est chargé analysé, et s'ajoute à la ligne de commande : FreeCAD @ResponseFile.txt ou : FreeCAD --response-file=ResponseFile.txt

Hidden options
There are a couple of options not visible to the user. These options are e.g. the X-Window parameters parsed by the Windows system:
 * -display display, sets the X display (default is $DISPLAY).
 * -geometry geometry, sets the client geometry of the first window that is shown.
 * -fn or -font font, defines the application font. The font should be specified using an X logical font description.
 * -bg or -background color, sets the default background color and an application palette (light and dark shades are calculated).
 * -fg or -foreground color, sets the default foreground color.
 * -btn or -button color, sets the default button color.
 * -name name, sets the application name.
 * -title title, sets the application title.
 * -visual TrueColor, forces the application to use a TrueColor visual on an 8-bit display.
 * -ncols count, limits the number of colors allocated in the color cube on an 8-bit display, if the application is using the QApplication::ManyColor color  specification. If count is 216 then a 6x6x6 color cube is used (i.e. 6 levels of red, 6 of green, and 6 of blue); for other values, a cube approximately proportional to a 2x3x1 cube is used.
 * -cmap, causes the application to install a private color map on an 8-bit display.

Running FreeCAD without User Interface
FreeCAD normally starts in GUI mode, but you can also force it to start in console mode by typing: FreeCAD -c from the command line. In console mode, no user interface will be displayed, and you will be presented with a python interpreter prompt. From that python prompt, you have the same functionality as the python interpreter that runs inside the FreeCAD GUI, and normal access to all modules and plugins of FreeCAD, excepted the FreeCADGui module. Be aware that modules that depend on FreeCADGui might also be unavailable.

Running FreeCAD as a python module
FreeCAD can also be used to run as a python module inside other applications that use python or from an external python shell. For that, the host python application must know where your FreeCAD libs reside. The best way to obtain that is to temporarily append FreeCAD's lib path to the sys.path variable. The following code typed from any python shell will import FreeCAD and let you run it the same way as in console mode:

Once FreeCAD is loaded, it is up to you to make it interact with your host application in any way you can imagine!

The Config set
On every Startup FreeCAD examines its surrounding and the command line parameters. It builds up a configuration set which holds the essence of the runtime information. This information is later used to determine the place where to save user data or log files. It is also very important for post postmortem analyzes. Therefore it is saved in the log file.

System related
Some libraries need to call system environment variables. Sometimes when there is a problem with a FreeCAD installation, it is because some environment variable is absent or set wrongly. Therefore, some important variables get duplicated in the Config and saved in the log file.

Python related environment variables: OpenCascade related environment variables: System related environment variables:
 * PYTHONPATH
 * PYTHONHOME
 * TCL_LIBRARY
 * TCLLIBPATH
 * CSF_MDTVFontDirectory
 * CSF_MDTVTexturesDirectory
 * CSF_UnitsDefinition
 * CSF_UnitsLexicon
 * CSF_StandardDefaults
 * CSF_PluginDefaults
 * CSF_LANGUAGE
 * CSF_SHMessage
 * CSF_XCAFDefaults
 * CSF_GraphicShr
 * CSF_IGESDefaults
 * CSF_STEPDefaults
 * PATH

Build related information
The table below shows the availible informations about the Build version. Most of it comes from the Subversion repository. This stuff is needed to exactly rebuild a version!

Branding related
These Config entries are related to the branding mechanism of FreeCAD. See Branding for more details.