TBC Macros and Extensions

 View Only
Expand all | Collapse all

Follow-on question to updating Feature Codes

  • 1.  Follow-on question to updating Feature Codes

    Posted 02-12-2025 14:32

    I've got the updates working beautifully well thanks to the help I've received here.

    What I've noticed, though, is that, while the properties of a point shows the updated value, neither the graphics window nor the Point Spreadsheet show the updates. Re-running the feature coding updates everything but a recalc does not. What's the best way to make sure my changes are visible immediately after the macro completes?



    ------------------------------
    David Brubacher
    ------------------------------


  • 2.  RE: Follow-on question to updating Feature Codes

    Posted 02-12-2025 15:11

    Updating a feature code and have the world view and point spreadsheet update works for me if I use the usual encapsulation in 

                with TransactMethodCall(self.currentProject.TransactionCollector) as failGuard:
                    failGuard.Commit()

    If you have my public macro collection have a look at SCR_SNRPoints



    ------------------------------
    Ronny Schneider
    ------------------------------



  • 3.  RE: Follow-on question to updating Feature Codes

    Posted 02-13-2025 08:03

    Thanks Ronny

    I've followed you on GitHub. I don't have public repositories yet because all of my work has been for companies. I will probably do some sample macros that lean on C# so others can see at least one worked example.
    Your answer is what I needed to see. I knew most of what we are doing should live in a transaction but I'd yet to see a clear implementation.



    ------------------------------
    David Brubacher
    ------------------------------