3D Design

3D Design

Topics related to Ansys Discovery and Ansys SpaceClaim.

Spaceclaim script sketching coordinates flipped

    • Matthew Westlake

      I created several scripts in Spaceclaim for parameterized geometry generation last year, and they functioned propertly.  Today, when I tried to use one of these scripts, it didn't function propertly. 

      Upon investigation I discovered that the Point2D.Create(input1, input2) command was creating geometry with the inputs flipped. 

      Here's the section of the code in question: 

      result = ViewHelper.SetSketchPlane(Axis1, Info1)
      result = SketchHelper.StartConstraintSketching()
      origin = Point2D.Create(IN(0), IN(TopHeadCenterElev))
      result = SketchCircle.Create(origin, IN(HeadRad))
      curvehead = result.CreatedCurves

      Last year when this script was run, the circle was created on the global Y axis, now the script creates a circle on the global Z axis. 

      This is part of a much larger collection of scripts, so flipping the inputs would be very labor intensive.

      Is there a setting that can be adjusted to cause the scripts to function as they previously did?

    • Devendra Badgujar
      Forum Moderator

      Hello Matthew Westlake

      Are you using the same version of SpaceClaim as before? If so, there might be different settings while you created the script. 

      Try clearing your user settings from File > SpaceClaim Options > Advanced > Reset All User Settings.

      Not sure if this should impact your script, but you can try setting Top View direction to Y axis as shown in the image below. This can be done from File>SpaceClaim Options>Behavior>Top View Direction.

      Let me know if this works for you. 


      • Matthew Westlake

        Devendra Badgujar 

        Thank you for your response, I am using the same version of SpaceClaim. The only user setting I adjust is the units. I tried changing the top view direction to X, Y, Z and then starting new documents. This setting has no effect on the way the the sketches function. 

        I tried resetting all user settings and restarting the program, but still see no change.

        Let me know if you've got any other ideas, thanks!


      • Devendra Badgujar
        Forum Moderator

        Matthew Westlake 

        Is it possible for you to share the script you are using, I will check if I am able to reproduce it. 

Viewing 1 reply thread
  • You must be logged in to reply to this topic.