June 19, 2021 at 1:16 pmPiotrMSubscriber
I am very new to scripting. I want to sketch line from 1 point (I knew coordinates X,Y) to 2 point which is a start point of some curve. I am not intresting in calculate these corrdinates (recording script gave me XY coordinates) I want to defind this point by something like GetRootPart().Curves.GetStartPoint(). Picture below. However i am not able to do this.
My sketch: XY plane.
first line was created by recorded script:
start = Point2D.Create(MM(1), MM(2))
end= Point2D.Create(MM(3), MM(4))
result = SketchLine.Create(start,end)June 21, 2021 at 1:08 pmKeyur KanadeAnsys EmployeeWhat is end objective? Do you want to create any parameter?
You can explore 'Block' function of SpaceClaim in 2021R1.
Please go through help manual for more details
How to access Ansys Online Help Document
How to show full resolution image
Guidelines on the Student Community
How to use Google to search within Ansys Student Community
June 21, 2021 at 3:58 pmTauron21SubscriberHi PiotrM I┬┤m also new at scripting with Spaceclaim (and it┬┤s actually harder as expected due to the lack of proper documentation or tutorials).
But maybe that could help you:
Used it for a Named Selection and it works. Unfortunatly it doesn┬┤t work for the "SketchLine.Create" command, as it expects something like Point(X/Y) and not a Selection.
Maybe you can find a workaround.
June 22, 2021 at 7:19 amPiotrMSubscriberHi Thanks for your anwsers.
To be honest I didnot check solution with: "Selection.Create(GetRootPart().Curves.GetChildren[ICurvePoint]())" . I would like to try this way also because as I understand it, this could be more accurate.
However, I did it on my way, I extracted coordinates from an object.
# Selection of point
pointStart = GetRootPart().Curves.GetStartPoint().Point - returns a tuple with coordinates (X,Y,Z)
# Extraction of point coortinates
pointStart_X = pointStart*1000
pointStart_Y = pointStart*1000
Viewing 3 reply threads
Ansys Innovation Space
- You must be logged in to reply to this topic.
Simulation World 2022
Check out more than 70 different sessions now available on demand. Get inspired as you hear from visionary companies, leading researchers and educators from around the globe on a variety of topics from life-saving improvements in healthcare, to bold new realities of space travel. Take a leap of certainty and check out a session today here.
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.Trending discussions
- How to work with STL file?
- drawing a geometry by importing a table of points
- Using Symmetry in DesignModeler and Expanding the Results
- section plane
- material properties
- Rotate tool in ANSYS Design Modeler
- ANSYS FLUENT – Operation would result in non manifold bodies
- Geometry scaling
- Parameters not imported into Workbench 18.2 from Solidworks/Inventor
- Convert Surface body to solid
Top Rated Tags
© 2022 Copyright ANSYS, Inc. All rights reserved.Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.