I am moving a scripted beam-model workflow from SpaceClaim to Discovery (Ansys 2023 R2 and higher).
In SpaceClaim, my script creates line beams with rectangular profiles (BeamProfile.CreateRectangular) and overwrites their properties with SetArea, SetMomentOfInertia, SetTorsionalConstant, SetCentroid and SetShearCenter. Mechanical imports these values correctly.
In Discovery the same script runs and the beams are visible, but the profiles do not appear under Physics, and Mechanical fails with:
PlugIn Error: Failed to import assembly from Discovery. Could not get the internal beam assignment.
Library profiles assigned manually via Assign Beams import fine.
Questions:
1. Can a user-defined beam section (A, I, J, centroid, shear centre entered directly) be created in Discovery, in the UI or by script?
2. If not, how can a rectangular profile with arbitrary dimensions be created and assigned under Physics by script?
3. Is defining User Integrated sections in Mechanical the recommended workflow instead?