Frequently Asked Question

How to add custom pictures in Need4Viz picturals components
Dernière mise à jour il y a 4 ans

Symptom

  • Add custom pictures in the list of values of Pictural gauge et Pictural stack

Environment

  • Windows Server
  • Need4Viz : versions >= 12.1

Resolution

To add a custom picture in the list of values of available pictures in Need4Viz Pictural gauge and Pictural stack (the list is common to this 2 charts) :

  1. Get the path in the svg file of your custom picture
  2. Open the file _list_picturals.json in the folder ~Need4Viz_folder_installation\nodejs\node_modules\custom_element\ce_settings\lang_EN
  3. Copy an existing entry ("man" for example) image
  4. And past it in the existing list (between "man" entry and "custom" entry). change id by an new key (must be uniq, in lowercase, without space or special characters). Change the name by a new value (can be whatever you want)image
  5. Ssave the file. Do exactly the same update in the file _list_picturals.json in the folder ~Need4Viz_folder_installation\nodejs\node_modules\custom_element\ce_settings\lang_FR
  6. Open the file list_picturals_paths.js in the folder ~Need4Viz_folder_installation\nodejs\node_modules\custom_element\ce_libs\resources
  7. Create a new line with entry corresponding to the key you created in the json files and the svg path of your picture. Entrey has to be "exports.id_of_picture"image
  8. Save the file
  9. Restart the Need4Viz server
  10. The new entry is available in your Pictural componentsimage

Caution

The update of the Need4Viz files is not supported.

  • Make a backup of each file you modify before any update
  • Respect the exact syntaxe of the files (do not omit characters ";" "{" "}"...) 
  • Do not delete the existing values of the list (man..., custom)
  • Before an upgrade of Need4Viz product, make a backup of your updated files, the upgrade will get back in it's original state the previously modified files. 
  • After a Need4Viz upgrade, modify the new files installed, do not replace them with previously modified in lower version of Need4Viz product

Veuillez patienter!

S'il vous plaît patienter... il faudra une seconde !