TAGGED: scripting, spaceclaim
-
-
December 11, 2019 at 3:14 pm
Guillaume ANFOSSI
SubscriberHello,
Is there a possibility to import a file (txt or csv) containing circle coordinates (x, y and diameter) ?
Thanks,
-
December 11, 2019 at 10:01 pm
Brian Bueno
Ansys EmployeeGUICAD
It's probably easiest to do this with a script. The syntax in items 1 & 2 is standard for Python. I think it will work in the script editor, but you might need to make some minor changes.
- Read the file into the script
# Open function to open the file "MyFile1.txt"
# (same directory) in append mode and
file1 = open("MyFile.txt","a")
- Iterate to pick up 1 set of (X, Y, r) values: File_object.readline([n])
- Create the circle:
# Set Sketch Plane
selection = DatumPlane1
result = ViewHelper.SetSketchPlane(selection, Info3)
# EndBlocks# Sketch Circle
origin = Point2D.Create(MM(X), MM(Y))
result = SketchCircle.Create(origin, MM(r))
# EndBlock -
Repeat the process for the next set of (X, Y, r) values
- Read the file into the script
-
- 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.

Ansys Blog
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.
- loss of user settings
- Ansys Discovery Modeler vs Spaceclaim speed
- pressure
- Annotation font color
- Can’t see license on online account
- Copy user settings to new release
- help online
- Unexpected graphics error
- ANSYSLI Exited or could not read server port ANSYSLI_FNE_PORT
- Python Script: graphical interface
-
5242
-
3297
-
2469
-
1308
-
988
© 2023 Copyright ANSYS, Inc. All rights reserved.