Export Texts from Civil 3D and Import from Excel to Update Texts

Capture

Hello everyone, I am trying to find a way to export Text objects from Civil 3D to an Excel file, they have to have a column structure (Every Text starting with the word ‘Level’ should be assigned to the column ‘Level’ in the Excel File, the same goes for the other Texts like Building, Site, Project. The Texts in Model are shown in the screenshot.

As a second step, I would like to update the data in Excel and connect them back to the texts from the 1st step in Civil 3D, so that when I run the script, the Texts in Civil 3D are updated.

Has anyone done anything similar that could be of help? I have created a script but it’s not working at the moment.
Below I upload the column structure in Excel that should be defined.

Thanks in advance!

Hi @kko3EBDE ,

Could you please share with some screenshots & files what you have tried so far :slight_smile:

Hello, this is how far I’ve got with the script until now

Hi
Share an example drawing & excel file

It seems like a very complicated way of doing things (using text and the Excel export/import process)

You would probably be better off using block attributes, or something like site objects and tags.
Whilst sites don’t have attributes such as ‘building’ or ‘level’ you might be able to borrow another property, or add a custom one

Hi @kko3EBDE ,

One of those dictionary values should have the MText values in it.
From there you could split the string and use i.e. String.Contains to determine which column the text should go to.

This is doable but need an example table mock up

Here’s a little something to get you started :smiley:
MText to Excel v0.dyn (57.0 KB)
MText to Excel v0.dwg (936.0 KB)

image

3 Likes