OffsetProfileParametersStation script anomaly

Hey Guys,

I created a script to add superelevation data as offset profile cross slope values, but it is acting strangely:

  1. Works perfectly on the outer offset alignment (that is longer than the centerline) if start station is 0+000
  2. Gives “parameter station outside profile range” error on the inner offset alignment (that is shorter than the centerline) regardless of start station. Does not find end station.
  3. If the start station is not 0+000, after a successful run (all python script variables give correct values) the station values are the double the correct values in the offset profile properties window.

So I have two major issues:

  • If the offset alignment is shorter, than the parent, for some reason it doesn’t recognise parent’s last station. Tried this manually as well, but it doesn’t accept last point either, but this one doesn’t make sense to me.
  • If start station of the parent is not 0+000 the srcipt works as intended, but the actual cross slope station values are doubled. If I substract start station of the values I get “parameter station outside profile range” of course.

I don’t know if there is something with my beginner pyton script, or is it an API issue, and I should rather post it to the Autodesk forum.
Has anyone met this issue? I attached a sample dwg containing all cases, and the dyn as well.
Thanks.
Offset superelevation.dwg (1.3 MB)
Offset superelevation.dyn (160.0 KB)

1 Like

Hi @kovacsv,

I tested it out and it seems to be working as intended when all of the correct inputs are selected. My guess is that you’re getting errors when you accidentally select the wrong alignments, such as selecting a parent alignment and then selecting an offset alignment from a different parent alignment. It might make the script more robust if you get the offset alignments and profiles (for example using the GetChildOffsetAlignmentsIds() method in the Alignment class) instead of asking the user to select them manually.

Also, it seems like the “RightOutLane” cross segment type is not returning the correct slopes when using AlignmentSuperElevationData.GetSlope. Can you confirm?

1 Like

Thanks @mzjensen I check again and try with GetChildOffsetAlignmentsIds().
I froze RightOutLane because it is not working properly, but I already adressed that in the toolkit feedback thread and if I am not mistaken github shows that it is already taken care of.

2 Likes

So, I tested all cases again and same results as described earlier :frowning:
Used AlignmentExtensions.GetOffsetAlignments node to make sure they are the right ones, and the results differ on the right (shorter) and the left (longer) side. If I delete last station on the shorter side it works fine.


Also when stationing doesn’t start at 0+000 the station values are doubled though the script output Profile.OffsetProfileParametersStation.Station values are correct :frowning:

1 Like

So, any ideas, anyone? :frowning:

Hi @kovacsv
Please attached dynamo file
Try this

1 Like

Offset superelevation.dwg (1.3 MB)
Offset superelevation.dyn (166.0 KB)

Hi @kovacsv
It works fine
Can you guide me to the problem?
Because my language is not good, I do not understand well


Offset superelevation rr .dyn (89.9 KB)
Offset superelevation 0t22.dwg (1.2 MB)

1 Like

for superelevation data as “RightOutLane” values or any type
using this


GetSlopetest .dyn (23.0 KB)

1 Like

Well, in your file it works perfectly in every case described above, so I must have messed up something in the test file, I have no idea what caused the problem. Thank you for your time, and the getslope dyn, I’ll definitely try it out.

1 Like