[Frage] [Interactor PythonParts] palette file [Gelöst]

Schlagworte:

Hi,

Regarding Interactor PythonParts, I have a question about palette's files.

In the documentation it says that you recommend to use the .pal extension but in some examples (as PythonPartConnection) .pypsub files have been used.

So, I wonder what extension I have to use.

Best Regards
Christophe

Lösung anzeigen Lösung verbergen

Hello Christophe!

First of all there are no technical limitations on you how do have to name the file with the palette definition as long as the file has XML structure and required tags. but we need to establish some conventions:

If you only need to build one palette for your Interactor PythonPart, you don't have to define separate .pal file. In fact defining your palette inside the .pyp file makes more sense, as you have everything in one file.

We recommend using .pal extension for XML-files containing only palette. In the PythonPartConnection example however, the .pypsub are more than just that. They are representing sub-PythonParts (Plate an Hole in this case), each with its own python script.

So depending on what is your goal:

  • .pyp only - for a simple interactor PythonPart with one palette
  • .pyp + pal - for an interactor PythonPart with more than one palette
  • .pyp + .pypsub - for an interactor PythonPart composed of more than one sub-interactor PythonParts

*.pypsub are used when the file is included in a main pyp

If you have more than one property palettes with the needed parameter => *.pal

Anhänge (1)

Typ: image/png
6-mal heruntergeladen
Größe: 21,84 KiB

Hello Christophe!

First of all there are no technical limitations on you how do have to name the file with the palette definition as long as the file has XML structure and required tags. but we need to establish some conventions:

If you only need to build one palette for your Interactor PythonPart, you don't have to define separate .pal file. In fact defining your palette inside the .pyp file makes more sense, as you have everything in one file.

We recommend using .pal extension for XML-files containing only palette. In the PythonPartConnection example however, the .pypsub are more than just that. They are representing sub-PythonParts (Plate an Hole in this case), each with its own python script.

So depending on what is your goal:

  • .pyp only - for a simple interactor PythonPart with one palette
  • .pyp + pal - for an interactor PythonPart with more than one palette
  • .pyp + .pypsub - for an interactor PythonPart composed of more than one sub-interactor PythonParts

Verwendung von Cookies:
Um die Webseite optimal gestalten und fortlaufend verbessern zu können, verwendet Allplan Cookies.
Durch die weitere Nutzung der Webseite erklären Sie sich mit der Verwendung von Cookies einverstanden.  -  Mehr Informationen

Schließen