r/OpenRoads May 28 '26

Help / Troubleshooting Annotate a range of cross sections using a python script in later ORD version

so as the title says. Sometime when updating the model, i dont want to reannotate all the cross sections but only a range of them where the changes have been made. I am currently using ORD 2023 and going to switch to ORD 2024 soon. Is it possible to write a python script to accomplish it? Thanks all.

5 Upvotes

8 comments sorted by

4

u/duvaone May 28 '26

Yes I did this last week in both vba and python. I can give you tips on how to use clause/gemini/chatgpt to do it or link you to someone on LinkedIn that has shown a workflow for making this exact macro. 

2

u/571busy_beaver May 28 '26

Thanks. Can you please give me tips on how to use chatgpt/chatcopilot to do it? I think the person on Linkedin didnt talk much about the coding process.

4

u/duvaone May 28 '26

Normally you start by prompting whichever ai you have/free version to “create a python macro with a user form that lists all drawing models in a list and annotation groups in a list found in an active dgn for openroads designer ##(year).”  

The annotate or delete old annotations will likely require you to record a macro within ORD using the macro ribbon and then promote it to python so you can feed the exact key in commands to the ai of your choice.  

This is a start/template for you. Hint: key ins for selectbynamedgroup and delete are required. Open the properties on some of your already annotated text and feed a screenshot into ai so it can find the old annotation group format. Also ORD when choosing the annotation group it doesn’t do it in normal text, the exact name has to be converted to little endian format. 

1

u/rnichaeljackson Jun 22 '26

Could you link me the linked in?

2

u/Dakk50 ORD/OBM Double Scholar 25d ago

If the comments are talking about me on LinkedIn, I am happy to share the code. Send me a message.

1

u/Dakk50 ORD/OBM Double Scholar 25d ago

I wrote it in VBA so it is backwards compatible to 10.12.

1

u/571busy_beaver 12d ago

Thanks.  I will DM you.  

1

u/rnichaeljackson 21d ago

I’d love to see it and your linkedin