Moving Levels' Extents

I have been working on a script to automate creating levels similar to ones on a selected link without Copy Monitoring so we can use our own types in the project.

After using the Create Method through the API I have successfully got the script to recreate the levels at the correct Elevations.

The problem I am running into now is the extents are different from the old ones.

As you can see in the image my newly created Levels do not line up with the levels I copied over. Anyone know how I can harvest the extent locations of the old levels and make my new levels hold those values? Preferably would like to do this through Python Nodes and the API, Thanks!

Solution I found in the API was to use the “GetDatumExtentTypeInView” and “GetCurvesInView” methods to harvest information from the old levels, and the “SetCurvesInView” Method for the new levels.

Keep in mind you will have to flatten the list you get of Curves you get from “GetCurvesInView”. And you will have to direct your code to use two Elevation/Section views to see both sets of extents for the levels (East or West & North or South).

1 Like