TAGGED: macros-scripting, spaceclaim
-
-
April 15, 2022 at 12:51 pm
sirusblack07
SubscriberI would like to extract the mass property values using scripting in SpaceClaim for a specfic body selection.
Thanks,
April 19, 2022 at 12:12 pmAniket
Forum ModeratorWhich of the mass properties are you looking for?
-Aniket
How to access Ansys help links
Guidelines for Posting on Ansys Learning Forum
April 19, 2022 at 2:03 pmErik Kostson
Ansys EmployeeTo get volume of a part on the tree see this:
volume = GetRootPart().Bodies[0].Shape.Volume
Also the MeasureHelper functionality can help with that.
selection = BodySelection.Create(GetRootPart().Bodies[0])
volProps = MeasureHelper.MeasureVolume(selection)
To get mass with MeasureHelper one needs to assign density (properties) to the part in question.
Then one can use the MeasureHelper GetMassProperties method to get the information.
All this can be recorded via the UI and them the above calls will be visible.
Search the forum and the internet to see how to record SC scripts.
All the best
Erik
May 19, 2022 at 12:33 pmFirasBejar
SubscriberThank you that solved my issue
RegardsViewing 3 reply threads- The topic ‘How to extract volume properties using scripting in SpaceClaim?’ is closed to new replies.
Ansys Innovation SpaceTrending discussions- FSAE CFD – Lesson 1 Preparation question (Using Discovery)
- Script for subtracting models
- Project lines/edges into a face with the direction normal to the face
- No preview in explorer with scdox file
- Multiple Instances of SpaceClaim taking multiple licenses
- Spaceclaim file reference error
- Issues after installing new service pack 2024R1 (sp5)
Top Contributors-
3832
-
1414
-
1193
-
1100
-
1015
Top Rated Tags© 2025 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.
-