Questions about mechanical scripting sizing settings

SSR
SSR Member Posts: 3
First Comment Name Dropper
**


Hello!
As shown in the picture above, I used mechanical scripting to set a sizing option, but I don't know how to use mechanical scripting to turn on Capture Curvature and Capture Proximity.

Answers

  • Mike.Thompson
    Mike.Thompson Member, Employee Posts: 327
    25 Answers First Anniversary 100 Comments 25 Likes
    ✭✭✭✭

    Have you tried recording your actions from the UI to see the API generated?

  • SSR
    SSR Member Posts: 3
    First Comment Name Dropper
    **

    @Mike.Thompson said:
    Have you tried recording your actions from the UI to see the API generated?

    I have tried this before, but the recording did not generate the corresponding code. To be precise, there was no response.

  • Mike.Thompson
    Mike.Thompson Member, Employee Posts: 327
    25 Answers First Anniversary 100 Comments 25 Likes
    ✭✭✭✭

    I don’t know off hand the API syntax, but do a dir(MySizingObj) function on your object and list all the properties of it. You can read through them.
    If that doesn’t work also do this on: dir(MySizingObj.InternalObject)

    python dir is a great function to see everything available on an object.

  • SSR
    SSR Member Posts: 3
    First Comment Name Dropper
    **

    @Mike.Thompson said:
    I don’t know off hand the API syntax, but do a dir(MySizingObj) function on your object and list all the properties of it. You can read through them.
    If that doesn’t work also do this on: dir(MySizingObj.InternalObject)

    python dir is a great function to see everything available on an object.

    Thank you very much for your suggestion. I looked at the operation manual and it did not mention that the sizing module sets the Capture Curvature and Capture Proximity function. Is it because there is no way to automatically realize the functions I mentioned above?

  • M
    M Member, Employee Posts: 235
    100 Comments Photogenic 5 Likes Name Dropper
    ✭✭✭✭
    edited January 24

    @SSR
    Look under the properties of your edge sizing control.

    edgeSize0 = ExtAPI.DataModel.GetObjectsByName('Edge Sizing')[0]
    esp = edgeSize0.Properties
    dir(esp)
    edgeSize0.PropertyByName('SizingCurvatureAngle')