The ICurvePoint command is displayed undefined in ACT start page

Member Posts: 7
Name Dropper First Comment
**
edited February 2024 in 3D Design


Using ICurvePoint to obtain a geometric point, encapsulation on the ACT Start page shows that ICurvePoint is not defined.How to solve this, or there may be other ways to obtain a geometric point.

Best Answer

  • Member, Employee, GitHub-issue-creator Posts: 353
    50 Answers 100 Comments Second Anniversary 25 Likes
    ✭✭✭✭
    Answer ✓

    You need to first import the SpaceClaim API packages in to ACT:

    1. import os, sys
    2. clr.AddReference("Ans.Utilities")
    3. from Ansys.Utilities import ApplicationConfiguration
    4. version = ApplicationConfiguration.DefaultConfiguration.VersionInfo.VersionString
    5.  
    6. sys.path.append(os.environ["AWP_ROOT"+version]+"/scdm/Scripting")
    7. clr.AddReference("SpaceClaim.Api.V{}".format(version))
    8. clr.AddReference("SpaceClaim.Api.V{}.Scripting".format(version))
    9. exec('from LoadSCDMAPITypesV{} import *'.format(version))
    10. exec('from UtilitiesOnLoadV{} import *'.format(version))

Answers

  • Member, Administrator, Employee Posts: 183
    100 Comments 5 Answers First Anniversary Ansys Employee
    admin

    I know this is a bit old, but @AKD-Scripting-Team - can one of you provide some guidance here?

  • Member, Employee Posts: 23
    Second Anniversary 5 Answers 10 Comments 5 Likes
    ✭✭✭✭

    Hello @zggnph ,

    Can you please share the line of main.py that generated this?

    ICurvePoint seems to be used in a Selection or something, so perhaps that method is using a loaded Method when launched in batch.

    Regards

    Adriano

    !> @zggnph said:


    Using ICurvePoint to obtain a geometric point, encapsulation on the ACT Start page shows that ICurvePoint is not defined.How to solve this, or there may be other ways to obtain a geometric point.

Welcome!

It looks like you're new here. Sign in or register to get started.