Support Forum

[Frage] [Interactor PythonParts] build_ele and palette [Gelöst]

Schlagworte:
  • Pythonpart

Hi,

I'm working on Interactor PythonPart for create industrial door.

So, I want to have just one PythonPart who call other files depend on the user's choice (capture 1 and 2).

I can see my palette correctly but where can I "refresh" the build_ele for getting all my properties ?

Here, the parameters of my second palette aren't accessible

Best

Anhänge (2)

Typ: image/png
43-mal heruntergeladen
Größe: 24,88 KiB
Typ: image/png
30-mal heruntergeladen
Größe: 56,74 KiB

Lösung anzeigen Lösung verbergen

It's working fine now

Based on Elements3DSelect example, my mistake was to call the geometry before having the good event_id

def on_control_event(self, event_id: int):
"""
Handles on control event

Args:
event_id : event id of control.
"""
if event_id == 1000:
self.show_palette("PortePivotantePos1V.pal")

def draw_preview(self, input_pnt):
"""
Draw the preview

Args:
input_pnt : input point
"""
com_prop = BaseElements.CommonProperties()
com_prop.GetGlobalProperties()
build_ele = self.build_ele_list[0]

if self.event_id == 1000:
....

It's working fine now

Based on Elements3DSelect example, my mistake was to call the geometry before having the good event_id

def on_control_event(self, event_id: int):
"""
Handles on control event

Args:
event_id : event id of control.
"""
if event_id == 1000:
self.show_palette("PortePivotantePos1V.pal")

def draw_preview(self, input_pnt):
"""
Draw the preview

Args:
input_pnt : input point
"""
com_prop = BaseElements.CommonProperties()
com_prop.GetGlobalProperties()
build_ele = self.build_ele_list[0]

if self.event_id == 1000:
....