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.

Select a curve for creating tube script

    • Shyam Prasad V Atri
      Subscriber

      Hey How do i select a curve made so that i can use it to create a tube while scripting?

      (I have created a curve from a file)

      # Create Sketch Cylinder
      selection1 = ICurveSelection(GetRootPart().Curves[0])
      result = TubeBody.Create(selection1, UM(1.00000096424072), ExtrudeType.None)
      # EndBlock

      This does not work. I have tried many different things. your documentation also is not telling me how to do the curve selection. Please let me know

       

    • Atharv Joshi
      Forum Moderator
      Hi Shyam, 
       
      Let me check this and get back to you. 
       
      Regards
      Atharv
    • Atharv Joshi
      Forum Moderator

      So here you need to make changes the following changes and try. 
      Ensure that you can in 3D mode before running the script. 

      curveSelList = Selection.Create(GetRootPart().Curves[0])
      result=TubeBody.Create(curveSelList,MM(5),ExtrudeType.Add)

      You can also make the selection with the help of Curve Selection commoand. 

      curveSelList = CurveSelection.Create(GetRootPart().Curves[0])

      Regards
      Atharv
    • Shyam Prasad V Atri
      Subscriber

      Sounds good thank you this worked for me

Viewing 3 reply threads
  • The topic ‘Select a curve for creating tube script’ is closed to new replies.
[bingo_chatbox]