- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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
Solved! Go to Solution.