But as you can see, the width of the columns are not aligned and I did not find in Dynamo any node to insert that Text coming from Excel inputs.
Being said that, I have been thinking about another workaround by creating a CogoPoint Label style invisible (NoDisplay) and then create a MLeader tag assigned to that object.
With this approach, it seems it is not possible to get different words in different rectangles either…
Last try I tried to create a Civil 3D table which allows you to create the number of columns & cells that you want but I did not get to create the “pointing arrow” as the MLeader entity has.
Does anyone know any other approach to get this task done?
I find another way that I am gonna test it out. Create a block with the attributes that I should insert in as a “table” and create a MLeader with that block. I hope I could modify the Block-MLeader attributes from Dynamo.
I saw you gave some updates on Camber v2.0.0. and Civil 3D versions.
I will install one of the versions you mention there and I will have a look at it. One more query, do you know if it is possible to change the color of one Tag value? I need to put in red if a value is higher than X.
There isn’t anything that comes to mind for that. Seems like you would have to edit the objects within the block definition in order to do that, which would change them for all of the block references within the MLeaders. So it wouldn’t be unique.
Hi @hosneyalaa . That it is but not only add the text. It should be possible to create a “rectangle boundary” per each text and be able to put some texts in red:
How can you use the code line you posted before? just copy and paste it in a code block?
Well, actually that is probably not an issue cause I can insert blank gaps in those values which are shorter in order to get all the rectangles with the same size.
def set_label_component(labelId,compName,value):
global adoc
global editor
global civdoc
names=[]
with adoc.LockDocument():
with adoc.Database as db:
with db.TransactionManager.StartTransaction() as t:
label = t.GetObject(labelId,OpenMode.ForWrite)
# Get text components
comps = label.GetTextComponentIds()
for id in comps:
comp = t.GetObject(id, OpenMode.ForWrite)
names.append(comp.General.Name)
compId = comps[names.index(compName)]
label.SetTextComponentOverride(compId,value)
t.Commit()
return label
I decided to remove it as I found out another way to do it. I will post my final outcome to receive your feedback or to tell me other workarounds to get a better result tomorrow.
I am gonna do it with CogoPoints, creating a PropertySet for each CogoPoint and modifying labels. However, as some labels should have some texts in red, I cannot just take the same style for every CogoPoint. I will have to create a style for those texts which are sometimes red.
You will see in my first screenshot that the table does not have the same width for all parameters. For that reason, in my Dynamo script, I have included blank spaces " " to match the longest attribute value. You can see here in the Pset that the blank spaces have been inserted:
Second issue, @mzjensen , I cannot find in the Camber package the input for the labels
to set the text later on. Do the nodes work with CogoPoints labels? Can the color of any specific parameter (text) be modified with your nodes?
Please, find attached the DWG file in case someone wants to have a look at it.
Since I did not find the SetValue node in Camber package, I saw in Civil3DToolkit that it is possible to assign values to a block but it is not working for me as you can see in the C3D modelspace, the values did not change: