Property Set To Object Data

Hello, this is my first contribution. I’m not a programmer, just an enthusiastic AutoCad and Civil3D user. First of all, I apologize for my basic English. I hope you can understand me.

I work for a utility company (water, sewer, power). I use CAD software for design (for example pressurized water networks) and other software for modeling and simulation (for example bentley WaterGems).

The fact is that I am working on a new workflow, which will allow us to optimize our work.

The slogan is:

  1. Use each software specifically for what it was created for (Civil3D for CAD, Autocad Map for some GIS, Erdas for satellite image processing and digital elevation models, WaterGems for simulation, etc). Yes I know, civil3D and Map are now a single software.

  2. Enter the data ONLY ONCE (or as few times as possible). In this way we minimize the probability of errors.

I am currently trying to convert user entered Property Sets (civil3D) to Object Data. I have achieved it but I want to improve it.

Property Sets have many advantages from a CAD point of view (for example the use of smart tags associated with each object).

On the other hand, the Object Data allows to easily export this information to the shapfile (SHP) format very commonly used by calculation software (WaterGems).

To comply with the slogan number 2, I have created the following script. My first Dynamo script. I have called it PS2OD (property set to object data).


PS2OD.dyn (75.2 KB)

Surely there is much to correct and optimize, that is why I share it with you. I look forward to suggestions.

I also have a query:

As you can see there are 2 scripts in a single file. For which I first execute the one above (the one below I leave frozen). Then I run the one below (and the one above I leave frozen).

How can I merge the two scripts into one? In other words, how can I make the second script run automatically after the first one. Is this possible?

Thank you very much for your suggestions.

Hi @francolaca,

Do you have a sample DWG to share that can be used for testing?

Maybe you could use this coded passthrough, and have it create the OD table definition first, then feed in the current document into the select all objects for reading property sets.

PS2OD v1 KM.dyn (75.5 KB)

2 Likes

Hi @mzjensen,

You can use this one. its a dwt what I made in civil3d 2018 ( Im updating to civil3d 2022)

Drawing3.dwg (2.8 MB)

Any way, you can define any property set you want. In theory, PS2OD should work with any Property Set that you define. :+1: :+1: :+1:

1 Like

Thanks @KirkWM, it works great :ok_hand: :ok_hand: :ok_hand:

Can you explain to me how this function works? or any documentation for beginners about it? is there any passthrough node ???

1 Like
3 Likes

Thanks @mzjensen, I understand now.

In this way we can control a linear workflow, without the need to execute several scripts sequentially, right?

Feel free to try my script whenever you like. I hope it is useful for you. Keep in mind this is prior step to using MAPEXPORT (now, you will have all the OD tables available to export)

PS2OD improved with Kirk’s suggestion:
PS2OD.dyn (106.8 KB)

Working on OD2PS :+1: :+1: :+1:

Looks good to me! The only thing I saw (and it is really minor) is that you could get all of the objects directly from Model Space instead of getting them by layer.

1 Like

I forgot to mention:

Property Set Definition and his Properties names, must not contain any separating symbols, except for underscores and dashes. These are the limitations of OD.

PS2OD, @mzjensen’s suggestion applied:

PS2OD.dyn (104.8 KB)

2 Likes

This is really interesting. Thanks for sharing! I manage my city utility network using object data alone (then export to my filegeodatabases via python script) and not property sets; however, since there are significant advantages for labeling in civil 3D with property sets, I may end up managing things with property sets and using this to copy the object data prior to my exports to GIS. My only thought regarding a possible disadvantage would be if I wanted to do some analysis and edit things in arcgis pro and then re-import some shp files. The entities would no longer have their property set data. I think if there was a script to also go from object data to property sets, that would create maximum flexibility. At least for me, I could see myself exporting from object data to property sets. At least from a city network level perspective.

1 Like

Hi @WrightEngineering,

Yes, it is on my working list !!!

Currently I am working in a script to export pressure networks (geometry and data) to shapefile file (pressurepipe networks do not have OD assigned, but instead have other properties, entered from the Content Catalog Editor).

Pressure networks to shape files

Then I go for OD2PS script :+1: :+1: :+1:

1 Like