3D Design

3D Design

Topics related to Ansys Discovery and Ansys SpaceClaim.

Select a curve for creating tube script

    • Shyam Prasad V Atri
      Bbp_participant

      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
Viewing 2 reply threads
  • You must be logged in to reply to this topic.