Questions about mechanical scripting sizing settings


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: 391
    100 Likes 25 Answers 100 Comments Second Anniversary
    ✭✭✭✭

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

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

    @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: 391
    100 Likes 25 Answers 100 Comments Second Anniversary
    ✭✭✭✭

    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
    Name Dropper First Comment
    **

    @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: 256
    50 Answers 100 Comments 100 Likes Second Anniversary
    ✭✭✭✭
    edited January 2024

    @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')