VB code for Node Support using Robot API to define uplift at rigid support in Y axis, UY+

VB code for Node Support using Robot API to define uplift at rigid support in Y axis, UY+

tkula
Observer Observer
110 Views
1 Reply
Message 1 of 2

VB code for Node Support using Robot API to define uplift at rigid support in Y axis, UY+

tkula
Observer
Observer

Hello,

I'm developing a VBA macro (via the RobotOM COM API, late-bound) that programmatically builds node supports in Robot Structural Analysis Professional 2027, including a "rocking bearing" connection that should restrain the reaction in the Y direction only in compression, with uplift (tension) allowed — the same behavior available manually in the Supports dialog under the Rigid tab, by leaving UY unchecked and setting its "Uplift" dropdown to UY+.

What I'm trying to do:
Define this same UY+ unilateral behavior on a support label entirely through the API, so it can be applied to many nodes across a generated model without manual steps.

What I've found in the API reference (RobotOM/Robot Object Model documentation):
- IRobotNodeSupportData exposes GetOneDir(direction) and SetOneDir(direction, type) methods, described as controlling "the manner of unilateral blocking of the indicated direction for support."
- The associated enumerations are IRobotNodeSupportFixingDirection (members include I_NSFD_UX, I_NSFD_UY, I_NSFD_UZ, I_NSFD_RX, I_NSFD_RY, I_NSFD_RZ) and IRobotNodeSupportOneDirectionFixingType (members I_NSODFT_NONE, I_NSODFT_MINUS, I_NSODFT_PLUS).
- The reference documentation I have access to does not list the underlying integer values for these two enumerations (the member tables did not extract from my copy of the PDF), so I inferred them from context and could not fully confirm them.

What's happening:
Using late binding, I create a support label, leave UY unrestrained (Data.uY = 0), and call:

Data.SetOneDir(I_NSFD_UY, I_NSODFT_PLUS) ' using my inferred values: I_NSFD_UY = 1, I_NSODFT_PLUS = 2

Immediately after this call, reading the value back on the same in-memory object via GetOneDir(I_NSFD_UY) correctly returns 2, confirming the value was set. However, after calling Labels.Store on the label and then re-fetching that same label fresh from the project (via Labels.Get), GetOneDir(I_NSFD_UY) on the re-fetched object returns 0 (None) — the setting does not appear to persist through the Store/Get round-trip. This also matches what I see in Robot's own UI: opening the resulting label afterward shows "Uplift: None" on the Rigid tab, not UY+, even though the in-memory read immediately after SetOneDir showed the value was applied.

I tried reordering the calls (Store the label first, re-fetch it, then call SetOneDir on the freshly-fetched reference, then Store again) in case the original object reference needed to already be persisted first — the result was identical; the setting still does not survive the final Store/Get cycle.

Questions:
1. Are I_NSFD_UY = 1 and I_NSODFT_PLUS = 2 the correct integer values for these enumerations? If not, what are the correct values for all members of both enumerations?
2. Is there a required step beyond Labels.Store to make a SetOneDir setting persist on a support label (e.g., a separate commit/apply call, or a required order of operations relative to setting the label's other DOF properties)?
3. Is defining a unilateral/uplift-only support via the API expected to work at all through IRobotNodeSupportData.SetOneDir, or is this setting only reliably supported through the Robot UI at this time?
4. If there is a different, currently-recommended API mechanism for defining a one-directional (uplift-only) node support, could you point me to it?

Environment: Robot Structural Analysis Professional 2027, VBA (late binding, no type library reference), Robot.Application COM automation from AutoCAD.

Happy to provide a minimal, self-contained VBA repro script if that would help.

Thank you for your help.

Best regards

0 Likes
Accepted solutions (1)
111 Views
1 Reply
Reply (1)
Message 2 of 2

Stephane.kapetanovic
Mentor
Mentor
Accepted solution

HI @tkula 

API- how do you create a one-way one-way support with the Robot API?

The example provides complete code for creating a UZ+ support, but you can adapt it to suit your needs.

 

Public Sub SetOneDir(_direction As IRobotNodeSupportFixingDirection, _how_blocked As IRobotNodeSupportOneDirectionFixingType)
Member of RobotOM.RobotNodeSupportData

public enum IRobotNodeSupportFixingDirection { I_NSFD_UX, I_NSFD_UY, I_NSFD_UZ, I_NSFD_RX, I_NSFD_RY, I_NSFD_RZ }

 Enumerations without explicitly assigned values start at 0, and each subsequent value is automatically incremented by 1.

public enum IRobotNodeSupportOneDirectionFixingType { I_NSODFT_NONE = 0, I_NSODFT_MINUS = -1, I_NSODFT_PLUS = 1 }

 

Stephanekapetanovic_1-1785472807023.png

Best Regards

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to click the Accept Solution button and leave a < like !
EESignature