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.

1 Like

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:

1 Like

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)

5 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

Hi @francolaca,
I have been doing some searching for a solution to add to property sets from object data. Your OD2PS script sounds perfect. Would you be willing to share this script?

Thanks,
Mark

I too am trying to go from Object Data to Property Sets. A dyn that could create Property Sets for Civil from Map Object Data would be very helpful.

Should that be a new topic.

Thank you,

I made the attached script a while ago. It works most of the time, there are some limitations (mostly data type issues e.g. handling operator characters). You could try if it helps you out.

I also had some issues with multiple tables in de ADEDEF, for me it worked because usually I got only one OD table for each drawing… however I now use own names for the PSET data titles.

Nobleo_ObjectdataToPropertySet4_civil2022.dyn (77.7 KB)

Is this of any help?

1 Like

Works great… Thank you.

What is the “TableIndex:” field for?
I am not sure if that setting has anything to do with why I cannot add columns to the Property Set schedule style.

Thank you,

These are extremely useful, thank you to all!!

Now that I have shared some of this with our company, I have a request to make the pipe network geometry (invert in, invert out), and information (Pipe and Structure Names, and Descriptions) into property sets and object data so they can be exported as shp files for modeling programs. But when I tried to create a property set with this information it is not natively readable. Is there a Dynamo dyn or set of nodes that i could use to get this information from the pipes and apply them as object data or an assigned Property set.

Thank you!

I used to have multiple objectdata tables in de adedef for multiple imports. The table index was used on the get od_table node to force use of the right table. There are probably other /better ways I would use these days.

On the pipe network issues: I have little experience in this topic, maybe someone else might help you there. In a previous lifetime I used xml input/output (for infoworks) but that is over 8 years ago…

You should take a look at the Camber Nodes, pretty much every thing seems to be covered there:

@geert.drijfhout i tried to open this but it is blank. Can you please confirm if this is working? Thanks

Hi Anthony, could you elaborate in “this”? What exactly seems to be blanc?