The ICurvePoint command is displayed undefined in ACT start page

zggnph
zggnph Member Posts: 7
Name Dropper First Comment
**
edited February 6 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

  • Landon Mitchell Kanner
    Landon Mitchell Kanner Member, Employee Posts: 297
    25 Answers 100 Comments Second Anniversary 25 Likes
    ✭✭✭✭
    Answer ✓

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

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

Answers

  • Chris Harrold
    Chris Harrold 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?

  • Adriano Zaffora
    Adriano Zaffora Member, Employee Posts: 22
    Second Anniversary 5 Answers 10 Comments Name Dropper
    ✭✭✭✭

    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.