Object Data Tables - How to Edit or Select Additional information once in C3D DWG

Hello all,

So I have a dyn script that runs perfectly every time. BUT, say I want to rerun it to select different objects (using Select Objects) a second or third time, it will not run as it knows that OD Table is already in the drawing.

I was wondering if anyone had found a way to use an if statement in with OD Tables, or how to edit existing OD tables once in a drawing. I am not sure I want to write another script to edit, but would rather have this one create or if the OD Table is present, apply it to a different object that I select.

Purely curious if anyone else had encountered this, and possibly how they work around it.

There is no need to attach the log file in my opinion, the exception is “Warning: OdTable.AddTable operation failed. Exception of type ‘Autodesk.Gis.Map.MapException’ was thrown.” which I interpret as the OD Table is already created and in the current document.

Thanks!
-jde

So there is the OdTable.GetOdTableByName node, I bet I can use that and have the name connect into the ODTableName String shown in the attached photo. Thoughts?!?

-jde

Hi @jehart,

You could try handling this with a few lines of DesignScript.

2 Likes

Thank you very much! That worked perfectly. I did not even think about putting the check into a code block.

Where is the kudos/thumbs up/thank you reward system here?

Thank you again MZJensen!

1 Like