March 17, 2021 at 9:09 amjainsamSubscriberHi, I am trying to write a Python script in an ANSYS Transient structural Problem to define a joint. I have written the code to create a joint and define all elements of it except the origin. In the joint, the reference coordinate system has origin by default to be defined by geometry selection. I am not able to find the command to change it to global coordinates. What is the Python script command to change it to Global coordinates?nPlease note that I need only Python script command that can be directly run in editor to change it to global coordinates.nMy current code to create a joint is:njoint1=DataModel.Project.Model.Connections.AddJoint()njoint1.ConnectionType=JointScopingType.BodyToGroundnnamed_selection1=DataModel.GetObjectsByName(XYZ)njoint1.PromoteToNamedSelection()njoint1.MobileLocation=named_selectionnjoint1.Type=JointType.Generalnjoint1.TranslationX=FixedOrFree.Freenjoint1.TranslationY=FixedOrFree.Freenjoint1.TranslationZ=FixedOrFree.Freenjoint1.ReferenceCoordinateSystem.PrimaryAxisDefineBy=CoordinateSystemAlignmentType.GlobalZnjoint1.ReferenceCoordinateSystem.SecondaryAxisDefineBy=CoordinateSystemAlignmentType.GlobalYn
March 17, 2021 at 3:16 pmAniketAnsys EmployeeHi,I believe there is a typo in the code for named_selection1 object in your code.nanyway if you enable recording you can get the code which you are stuck on as follows:njoint1.ReferenceCoordinateSystem.OriginDefineBy=CoordinateSystemAlignmentType.Fixednjoint1.ReferenceCoordinateSystem.OriginX = Quantity(1, m)n-AniketnHow to access Ansys help linksnGuidelines for Posting on Ansys Learning Forumn
March 17, 2021 at 3:55 pmjainsamSubscriberHi Aniket, nThank you for your response. I had already tried the code suggested by you but it is giving the following error:nCoordinateSystem' object has no attribute 'OriginDefineBynNeither the editor is showing the command on the recording. Could you please help me with how to get this attribute in my editor?n
March 18, 2021 at 4:50 amAniketAnsys Employeewhich version are you using? I have checked this in 2021R1 and seems to working.n-AniketnHow to access Ansys help linksnGuidelines for Posting on Ansys Learning Forumn
March 18, 2021 at 5:46 amjainsamSubscriberI am using ANSYS 2020 R1 version. Maybe there is some option to see all attributes in my version too. Alternatively, can this be implemented using the APDL Command block? If so, please help me with how to implement using the APDL command block.nn
March 19, 2021 at 11:27 amAniketAnsys EmployeeIs there any chance that you can upgrade to 2021R1? you can use dir() and help() methods to check all attributes and arguments for an object in python.n-AniketnHow to access Ansys help linksnGuidelines for Posting on Ansys Learning Forumn
- You must be logged in to reply to this topic.
Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.
Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Saving & sharing of Working project files in .wbpz format
- Understanding Force Convergence Solution Output
- An Unknown error occurred during solution. Check the Solver Output…..
- Solver Pivot Warning in Beam Element Model
- Colors and Mesh Display
- whether have the difference between using contact and target bodies
- How to calculate the residual stress on a coating by Vickers indentation?
- What is the difference between bonded contact region and fixed joint
- The solver engine was unable to converge on a solution for the nonlinear problem as constrained.
- User manual
© 2023 Copyright ANSYS, Inc. All rights reserved.