How to access a scoped geometric entity in Spaceclaim wizard?

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

    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