Hi y'all!
I have spent an hour or two researching the possibility of exporting the data of from "Property Sets" into a text file. When I write property set I mean those that can be found on the "extended data" tab in the properties palette. I've come to the impression that it isn't too straight forward. I'm still optimistic that the forums might know better!
Anyhoo. What I think I want is...
...to export all the property set data of objects with property sets into a text file in such a way that the data is exported in the format "obj_handle", "obj_type", "propertyset_name", "property", "property_value".
I got the impression that "dictionaries" are somehow involved (?). I am not a total newb with lisp development but I accessing the propertyset values is new for me. The part with exporting to a text file I already have but the iteration of objects and properties within property sets is something I hope to get some help with!
I think the process should roughly be
Thanks in advance!
Solved! Go to Solution.
Solved by Buzz0m. Go to Solution.
Thanks @paullimapa for the links! I looked through those before posting here but I was put off by the mention of autocad architecture. I need a stand alone solution for Civil3d or Autocad and I was not able to find anything that doesn't require "AecScheduleApplication" which seems to be part of ACA.
I am not 100 % sure if this really matters but it also seems that some of the solutions have to do with properties that are assigned to block objects. I fear that this might differ from what I am looking for. The case I have at hand needs to be specifically user assigned property sets and corresponding properties which can be assigned to any type of object (I am dealing with solids mainly but it is technically possible to add prop sets to any objects type). I added a picture for clarity even though it might be redundant. I also added a dwg file for testing if anybody is keen on taking on this challenge 😃
Again, thanks for the quick reply! Can you come up with any more pointers, @paullimapa?
Unfortunately, I have no experience with Civil 3D and in plain AutoCAD this is all I see in the Properties window:
Thanks @paullimapa for verifying, that the propertysets are only available in specific software! I assumed that they would have been available in vanilla ACAD, but I was mistaken!
Glad to have helped…cheers!!!
@Buzz0m as you've found PropertySets are not available to plain AutoCAD. They are an ACA 'thing' but since Civil 3D is derived from ACA we also have access to them. However, also as you've found, the COM API for them is NOT included with Civil 3D. You can access them with the .NET API. This is a tool I have been working on (displaying the data in your dwg):
@Jeff_M that tool looks awesome! And thanks for giving me some clarity on the technical side! I'll give .net a go, but it is definitely something outside my comfort zone!
Are you developing that tool for commercial use or as a some kind of free tool? *fingers crossed* 😄 If the latter do you think you cold include the option of exporting the data in pivoted format (handle, propertyset name, property_name, property value)? I am increasingly leveraging Power Query and Power BI in my projects and I suspect others do as well. I believe the pivoted format would be more easily adopted since the column names would be standard and the users could then manipulate the data in a more dynamic way.
@Buzz0m I am hoping to get the beta testing completed soon and then I will likely be adding to the Autodesk App store. It will have a small fee to download.
I have no idea what those "Power *" tools are, this is the first I've ever heard of them. Right now the "Export to File" creates a new Excel file for each PSetDefinition, with the file named the same as that Set. Attached are the 2 files created using your dwg. How would you make these to fit your case?
@Jeff_Mthat sounds very promising! I'll keep an eye out for it! I work in a company with roughly 500 c3d users, so when you work out the licensing and cost models please take this scenario into account (i.e. for my company to have use of a specific tool it would need to cost/user would have to be small or one-time since the tool needs to be widely available even though only a fraction would use it).
Power Query and Power BI are tools that visualize and manipulate data in structured way. The former works pretty much the same way as surfaces work in C3D and the latter is a dynamic data visualization tool. I can't explain it (and nobody asked me to do it either) but these tools are something I believe any efficient designer need to be familiar with. Especially in data management. Here's a few examples of Power BI. The beuty of both solutions is that they are totally free to use (though power bi requires some licensing models for the more sofisticated publishing methods) and are developed by Microsoft.
https://playground.powerbi.com/en-us/showcases-gallery/insight-to-action
https://app.powerbi.com/view?r=eyJrIjoiODQxOTkyMjYtYjgwNC00ZjY4LTg3MGEtMWJkZDg5NTA1YTZhIiwidCI6IjkyNWJkNTViLTA1MjEtNDAwMy1iN2M5LWMzZTY4MzY3ZDcyNCIsImMiOjh9
I'm getting a bit sidestepped here. Anyway... I'm keeping this thread unsolved until I have the time to develop the code or somebody else posts it!
There seems to be a command called exportpropertydata, which creates a access database. The data can be read from that database. It is however not an optimal solution for me, but nevertheless one solution.
Hi @Buzz0m
In addition to exporting to an Access Database, if you create a Schedule table you can then export the table to CSV (just by right-click on the Schedule object)
Alternatively, what I think will be much more useful to you is installing and using the Standardized Data Tool extension for Civil 3D to manage Property Sets. The tool can be used to assign Property Set to objects, Set the Values from Excel and export the values to Excel.
Hope this helps,
Samir Rezk
Technical Support Specialist
Hi again @Buzz0m
I forgot to mention how to create a Schedule in Civil 3D! If you prefer to create a schedule table then export to Excel or CSV
Samir Rezk
Technical Support Specialist
Thank you @samir.rezk for the pointers! I had totally forgotten about that SDT functionality! I've never tested it but saw some post somewhere that was giving instructions on use! I'll give it a go!
The schedule app is part of ACA and hence it is not a viable solution for me.
The Standardized Data Tool is already another solution to get the data, but I'm still not ready to mark this as solved. My goal of getting the prop set data with one click/command exported still remains! 😃
I tried the SDT and even though it is probably very efficient I can't say that I found it very intuitive. If I struggle with it so will my colleagues. I don't like to be the neysayer, but I don't believe this is the optimal solution when trying to "reach the masses". =/ Nevertheless I found it insightful and nice to learn of a new tool! Thank you again for the links @samir.rezk
Wait a sec now... for some reason I have the directory @samir.rezk pointed out... I thought it was only available if one would install autocad architecture(?). I'll have to come back to this, but some of what I've claimed earlier might be wrong.
Statusupdate:
I abondened the hopes of getting the lisp code to work in a clean Civil3d install. I am currently discussing with independent software developers to develop the necessary code. Not perhaps the most elegant solution, but sometimes time and effort >> money.
... currently discussing ... to develop the necessary code.
There are existing tools available that would let the Civil3D user export MapOD or PropSet data directly to an XLSx which (provided with the drawing) could be used to import the same data into XData on plain AutoCAD (using the add-on's cousin) for that platform. Changes could be made in ACAD and the data round tripped back to Civil3D PropSets.
On second thought, the Civil3D user could use the add-on's Extended Data Convert to convert the PropSet to XData inside the drawing so the ACAD user only needs to open the drawing, and could even use their own Lisp to manipulate it, maybe not round trip it.
I was able to solve this with the help of one wonderful forum member. The needed piece of code was necessary to be compiled and developed in .net. Then that .dll file was netloaded with traditional autolisp.
>>>Here starts the unnecessary showcase of the result<<<<
The endresult (at the moment) is a text file. The file is saved in a subdirectory in relation to the actual dwg.
The filename is based on dwg name and object types OR user selection.
The data is then queried with "Power Query" from excel.
After linking the txt file to power query and excel the propdata can fairly easily be updated to any other visualisation or quality control. The user ofc has to run the lisp when changes are made but the hard coded locations makes sure that user errors are consistent.
Can't find what you're looking for? Ask the community or share your knowledge.