[Otázka] [Interactor PythonParts] palette file [Vyřešeno]

Tagy:

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

Show solution Hide solution

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

Přílohy (1)

Type: image/png
Staženo 6
Size: 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

https://campus.allplan.com/ používá cookies  -  Více informací

Souhlasím