Create Profile

@Drbohlav, many thanks for your work, but unfortunately something goes wrong…
DynamoCivilError02

Do you have this alignments = IN[0] on line 82?

1 Like

@n.rapetti you can save some effort and use the Civil 3D Toolkit package.

3 Likes

@Drbohlav now it works. Many thanks. Now I’m trying to understand because it create a sub list. But it is always a great results.

@mzjensen thanks for the advice, I will test also this approach

Try to find more information about for-loop. Number of sublists is corresponding to number of alignments.

1 Like

Hello,

I am creating a script that would create a surface profile in the alignment and create profile views for multiple alignments, my issue was the surface profiles are not created in the alignment.

i have attached an image of what i have done. Can you please check.

Thank you
Ernest

1 Like

Hello,
please read first Dynamo Primer and node warnings in your script first. It will help you a lot.
Here is my picture:

1 Like

thank you! it works now.

Hi @keith.sowinski ,
I tried these scripts and was met with a couple of errors:


The first one (left) said “unexpected indent”, and the other two (right) said:

Traceback (most recent call last):
File “”, line 75, in
TypeError: object of type ‘NoneType’ has no len()

Now, I might not even be using the nodes correctly in the first place. For instance, I’m giving it multiple alignments to create profiles on, which might be a problem for it.

Also, when you say you “haven’t published our package yet”, do you mean the Civil 3D Toolkit? Or a different package that I should look out for?

@jameshitt any reason to not just use these?

To identify where the “unexpected indent” is, try pasting it into a more robust IDE, such as PyCharm. You could even use an online one like this. For the other Python nodes, check your input list structure.

I recommend that you use the Civil 3D Toolkit. You should be able to accomplish what you need without the Python.

Our node package is not available from the Dynamo Package Manger. It is published with the Wisconsin DOT State Kit. We will likely be retiring the package with Civil 3D 2022.

2 Likes

Obrigado! funcionou bem

No, these nodes call up already existing profiles (if I’m understanding them correctly), but I would like to create new profiles altogether. Just a simple profile, two PVI points and a single elevation.

For a large subdivision with many streets, this just makes the initial setup quicker. After creating the alignments from a 2d master plan, I can quickly create all the profile views at once (with a dynamo script), then it would be helpful to just as quickly create all the initial profiles with another script (after which begins the detailed profile design, which by its nature requires a hands-on approach).

They will create new profiles, and then PVIs can be added to them.

1 Like

Wow, I’m still adjusting to understanding the way the nodes are named. But I like how it splits up the actions of creating an object, and then actually adding definition to the object. Once you get a little more used to it, this way of seeing Civil 3D seems more logical than the way it is presented through the program’s default user interface.

That online Python tool is excellent! I do need to re-install Pycharm again; I had it to start learning Python. (One Windows re-install later, I keep forgetting to install it again)


Hi Zach, I’m new to dynamo. I’m trying to create multiple profiles from one of your scripts but not winning. Please take a look at the attached image and kindly advise.

Hi @sihle.dlamini,

It looks like there are just a few inputs missing. You need to provide values for ‘style’, ‘labelSet’, and ‘offset’. If you hover over any port you will see what type of object it is expecting and whether a default value is supplied. If there is no default value (as is the case for all of the inputs except ‘layer’ for this specific node), then the node will not execute until a value is supplied.

On another note, I see that the profile name you’ve supplied is “EG - Surface” in double quotes. Because it’s a string node, the double quotes are not needed, unless of course you want the profile to be named “EG - Surface” with the double quotes. If you put the same thing in a code block, then the double quotes would be needed so that it is interpreted as a string.

2 Likes

Hi @mzjensen

Thanks a lot, works like a charm

1 Like