It’s my first day using Civil 3D. I have an extensive Dynamo Revit background though. I have spent the last several hours trying to get user-defined Parameters from a Block Reference.
I found the trick for grabbing the Parameter Dictionary from a block (BlockExtensions.GetParameters from Civil3DToolkit) but this does not work with a Block Reference. I also found the post below but I am not quite sure
Thank you for any help that you can provide,
Edit: I changed this original post to better reflect my question based on mzjensen’s first reply below.
When I hear user-defined properties I think of the UDPs that can be added to COGO points and Parcels, which are in a class of their own and (as far as I know) only apply to Civil 3D objects and not AutoCAD objects like Block References. By “user-defined properties”, do you mean block attributes or maybe parameters?
I’ve also been puzzled for some time on how to emulate EATTEXT functionality with Dynamo nodes.
Block and Block Reference is a similar consept to Family Type and Family Instance concepts in Revit world, respectively.
Block is a block definition, whereas Block Reference is its instance in the model.
Images attached explain the matter and, potentially, give you the answer you are after.
P.S. If you don’t need Civil 3D functionality in the workflow, you can launch Civil 3D as AutoCAD and get to dynamo by AECCLAUNCHDYNAMO comamnd. It will still use Civil 3D license for it, but it won’t be a Civil 3D - database file.
Thank you for the reply. I guess yes I do mean parameters. Originally wrote my post was written with parameters but after further research, I changed it (probably just got confused after several hours of searching).
I am trying to get a user-defined name for each Block Reference.
That got me what I was after but it does not let you access the rest of the parameters. Looks like Civil 3D Dynamo is going to be a much steeper learning curve than I originally thought. I thought my Revit/Dynamo knowledge would transfer but nothing is remotely named the same or functions similarly.
It was not clear from your original question what kind of parameter you are after.
AttributeTag is another type of parameter user can define, not to mention PropertySets (That’s another story alltogether, coming from AutoCAD Architecture).
Dynamo for Civil 3D is similar to Dynamo for Revit in a sense that without knowing software well (ideally, how the objects of the dwg file database are called in API language) you might find learning curve very steep.
Looking at your examples and that you are insisting on using Civil 3D (not a plain AutoCAD), I would recommend using CoGo points, this will not only allow you to pace them by csv file, but also such stuff as dynamic tagging, assigning styles for how they should look like (by picking a block essentially), annotativity and User-Defined Properties (Only if needed). CoGo’s already come shipped with some fields you can use to populate values in.
Most of what CoGo points can give you is Dynamo-free as well, but @Paolo_Emilio_Serra1 implemented quite a few nodes in Civil 3D Toolkit to have a play with Getting-Seting all sorts of parameters for them. It sits under LandDevelopment part of it.
As per your screenshot above, you can get Block Coordinate System instead and then calculate angle between base vectors and the ones you retrieve. AutoCAD only shows Rotation in a properties tab, but it is not actually a parameter of a block instance. Also Rotation value depends on what are the settings for angle calculation (Clockwise vs CounterClockwise and from what base angle - N, E, S or W) in UNITS of the dwg. So it might not match the ones you retrieve by Dynamo query.
We are not developing the Civil 3D files but we do need to export information from them so we can translate it to our Model. The civil team has input many parameters. I will take a look at CoGo points and see what all I can get with that.
Thanks for the info on rotation. I am not 100% sure if we will need this or not. I was just trying to grab data points from the properties palette as a proof of concept. I just find it strange that there is not a single node to grab any parameter in there. As you have pointed out I do not know the software so maybe there is a good reason for this. This is just my take from the outside looking in.