Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
3D Design

3D Design

Topics related to Ansys Discovery and Ansys SpaceClaim.

Spaceclaim Scripting TypeError: expected Plane, got Plane

    • Niklas Sellmann
      Subscriber

      Hello,

      i try to create an ACT wizard extension for spaceclaim. I already wrote a code that creates a geometry in spaceclaim and it works fine when i start it directly in the scripting extension of spaceclaim.

      For the ACT version i have an issue with the creation of a planar body. The following part of the code creates an error:

      import clr
      import units
      import time

      clr.AddReference("SpaceClaim.Api.V23")

      from SpaceClaim.Api.V23.Geometry import *
      from SpaceClaim.Api.V23.Modeler import *

      ...

      #polGen is a List[ITrimmedCurve] of curvesegments
      refPlane=Plane.PlaneZX
      face1 = PlanarBody.Create(refPlane, polGen)
      body1= face1.CreatedBody

      ...

      The row, where PlanarBody.Create is executed, creates the following error in the ACT Log console:

      TypeError: expected Plane, got Plane

      I can't find a solution to this problem, does anybody know how to solve this?

    • ErKo
      Ansys Employee

      Hi

      This should help (change v19 to v23 in the below script).

      https://discuss.ansys.com/discussion/653/how-to-import-spaceclaim-api-packages-in-act

      Should you have any more questions post it in that forum (dedicated to scripting)

Viewing 1 reply thread
  • The topic ‘Spaceclaim Scripting TypeError: expected Plane, got Plane’ is closed to new replies.
[bingo_chatbox]