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

Tagy:

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

Přílohy (2)

Type: image/png
Staženo 37
Size: 24,88 KiB
Type: image/png
Staženo 28
Size: 56,74 KiB

Show solution Hide solution

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:
....


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

Souhlasím