-
-
June 29, 2022 at 6:09 pm
balfaro
SubscriberHi all,
I am reviewing a Python script that is supposed to automatically generate geometry in SpaceClaim, and as I was going through it I noticed the line
bodies = GetRootPart().Bodies
I have looked through the API documentation for my versions (V19), but I cannot see this funcion anywhere. Does anyone know what it does?
-
June 30, 2022 at 7:53 am
jonl
SubscriberThe root part is the top level of your model and includes all components, bodies, datums and such. In your case, "bodies" is a list of all the bodies at the top level of your model (meaning any bodies within components are not included).
-
August 5, 2022 at 4:50 pm
Andrew Stankovich
Ansys EmployeeSpaceClaim scripting is broken up into primarily two different sections: Core API and Scripting API. The Script Editor inside SpaceClaim is configured in such a way that it may not be clear when a command is being called from the SpaceClaim.Api.Vxx namesspace or the SpaceClaim.Api.Vxx.Scripting namesspace. These aliases makes it easier to quickly write code and reuse recorded code due to the shortened naming, but it means that often times the documentation can be difficult to find for a specific alias.
If you are using 22R2 there is now a combined chm document for the APIs at “C:\Program Files\Ansys Inc\v222\scdm\SpaceClaim.Api.V22\API_Combined_Class_Library.chm”
If you are using an older version please search both the API_Class_Library.chm and the API_Scripting_Class_Library.chm when looking for documentation.
The GetRootPart() function returns the reference to the top most (root) part of the currently opened document. This is explained in more detail in the Developers Guide pdf in the installation. "C:\Program Files\Ansys Inc\v222\scdm\SpaceClaim.Api.V22\Developers Guide.pdf" See image below for outline of an example of the hierarchy in SpaceClaim.
-
- The topic ‘What does GetRootPart do?’ is closed to new replies.
- FSAE CFD – Lesson 1 Preparation question (Using Discovery)
- Project lines/edges into a face with the direction normal to the face
- Script for subtracting models
- No preview in explorer with scdox file
- Multiple Instances of SpaceClaim taking multiple licenses
- Issues after installing new service pack 2024R1 (sp5)
- Spaceclaim file reference error
- Add-in Error Excel
- Problems with loading my Discovery Mesh into Fluent
- Missing SubDivWrapper.dll
-
3977
-
1461
-
1272
-
1124
-
1021
© 2025 Copyright ANSYS, Inc. All rights reserved.