How to access a scoped geometric entity in Spaceclaim wizard?

Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 389
First Anniversary Ansys Employee Solution Developer Community of Practice Member First Answer
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: 389
    First Anniversary Ansys Employee Solution Developer Community of Practice Member First Answer
    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