How to access a scoped geometric entity in Spaceclaim wizard?

Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 452
100 Answers 250 Likes 100 Comments First Anniversary
✭✭✭✭
edited June 2023 in 3D Design

How to access a scoped geometric entity in Spaceclaim wizard?

Tagged:

Answers

  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 452
    100 Answers 250 Likes 100 Comments First Anniversary
    ✭✭✭✭
    Answer ✓

    Use a <onvalidate> callback on the property which scopes the geometric entity. The onvalidate function call should make the selected list of entities global.

    <property name="faces" caption="geom" control="scoping">
        <callbacks>
            <onvalidate>call_on_val</onvalidate>
        </callbacks>
    </property>
    
    def call_on_val(object, property):
        global faces
        faces = Selection.GetActive().Items
        return True