General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

Named selections, scripting and modification of holes position on a plate: reg

    • tanmay.singhal
      Subscriber

      Hello All,

      Requirements : 

      I have to attach a point mass with these 4 points as interface.

      I want to move the 4 holes as per my requirements using scripting and want to associate the point mass with these 4 holes.

      I want to move these 4 holes and want to change the relative distance between them using scripting.

      I have gone through some videos, but it has been confusing. 

      Some suggest to go with named selection, some with parametrization, and some with scripting.

      I assume scripting will be better if i want to scale this kind of problem, where i have any number of point masses and interfaces.

      I am new to ansys scripting. Kindly share with me if there is any way to resolve this.

       

       

    • mohan.urs
      Ansys Employee

      Hey Tanmay,
      The better approach would be use parameters in spaceclaim or discovery to change the relative distance using expressions to control position of holes and mechanical scripting to attach point masses using a python object.

      Here are some references for it
      Spaceclaim Parameters - 
      Working with Parameters
      Expressions, Functions, Quantities, and Units

      Script for adding point masses - 
      How to add point mass to a specified named selection with its properties defined in the script. — Community Forum

      If you want to do it all through scripting i would suggest you use developer forum in the above link to search or create posts. It is similar to this forum but is more focoused towards scripting.

      Regards,
      Mohan Urs

    • Harshvardhan
      Ansys Employee

      Hi,
      For scripting related queries, it might be better to post it in the Ansys Devloper Forum. There you will find scripting related answers easily.
      Home - Community Forum

      Regards,
      Harshvardhan
      Ansys Help
      Ansys Learning Forum (Rules & Guidelines)

    • tanmay.singhal
      Subscriber

      Thank you for the guidance Mohan. I will attempt these option and will revert back.

      Further, when i will be scaling for different point masses at different location on the same plate, for each point mass I want to use a excel sheet to define the coordinates of the centre of the interface circle, the diameter and extrusion.

      I understand that i have to assign one reference coordinate system about which the above coordinates will be defined.

      I think defining in the script will be better for assigning.

      Please share your thoughts on this approach.

       

      • mohan.urs
        Ansys Employee

        Hey,
        The operations you have mentioned might all be possible through parameters as well although not directly but i definitely see a way.
        But like you mention it will be easier through scripting. Like Harsh mentioned browse through Developer forum to see if there are any relative posts.

        There is another option in spaceclaim - Scripting - which records the operations you do inside the software. You could utilise this to find out the right functions to move and place your holes. Explore the help link to know more about it.

        Regards,
        Mohan Urs

Viewing 3 reply threads
  • You must be logged in to reply to this topic.