Good morning,
I have a doubt. I want to get the list of Properties from a PropertySet.
Actually, I already have the PropertyDefinition, but I only want the Property … In the image there are three paths that I investigate … the one in the middle seems that I already have it, but actually I only want the Property and not the PropertyDefinition.
Actually, I still don’t quite understand what the difference is between Property and PropertyDefinition, or between PropertySet and PropertySetDefinition.
Thanks for your support … Regards
Hi @ramallafre,
Property Set Definitions and Property Definitions are the things that you create in the Style Manager. A Property Set Definition contains Property Definitions. They don’t contain any actual values, but rather the definition for the properties when they get assigned to objects.
Once a Property Set Definition and Property Definition have actually been applied to a specific object, then they are Property Sets and Properties, respectively.
There are a couple of nodes in the Civil 3D Toolkit that you might take a look at as well.
Thanks for the clarification. In the end it is the same, one at a Structural level and the other at a Particular level.
Anyway, in the attached graphic above, what I want to do is just get the name of the Property not the PropertySet Definition. It is to export it to Excel … I have managed to export all the PropertyDefinition … but it is a very long name, I just want the Property to appear.
Attached image of export to Excel. Only the text in green I want to be reflected.
With the ToolKits tools I don’t see that tool that I require either.
Thanks for the support
Ah OK, I see what you need now. For some reason these nodes aren’t visible in the library, but you can get to them by searching in the graph view.
@solamour do you know how it could be that a node can be placed in the graph but doesn’t exist in the library?
Thank you very much That is the solution.
PropertyDedifinition.Name (to string) I can’t find it in the list of Autocad Nodes …
Apparently there are more than those that appear in the list on the left, right?
Greetings
Try this simple line of design script in a code block and see if it returns the value you seek: prop.Name;
Yes, I already tried it, thank you. What he commented is that he does not know that there are more scripts / nodes than those that appear in the menus on the left … What difference are those scripts with those that are in the glossary on the left of the screen?
Likely a missing pacakage or an older version of Civil 3D and the Dynamo for Civil 3D add-in.
Nothing shows up in the Workspace References window when these nodes are part of a graph.
The nodes also do not exist in the library in Civil 3D 2022 and Dynamo Civil 3D 2.10.1.
Post the graph and I’ll track them down.
PropertyDefinitionNodes.dyn (6.1 KB)
In this particular case it is because the PropertyDefinition object has a constructor marked as internal (which means that it does not show up in the library) and there are no public methods associated to the class (except for the ToString override) but only public properties (Name, Description, DataType, Automatic). There is an extra public property called “InternalPD” that is marked not visible on purpose and cannot be called via a node in Dynamo.
Thanks Paolo. I will try to understand what you are saying without having my circuits cut off. :)… No problem.
Another thing that I have seen is that in Civil I can create a Property with an Automatic Increment Integer data type, but since Dynamo there is no such option … Am I right?
That’s good to know, Paolo. I didn’t realize that internal methods would still be accessible. So if you wanted to fully restrict access, would you make the methods private or add the [SuppressImportIntoVM] attribute?
correct
not explicitely