Get Insertion Point of a (existing) Profile View


I’m trying to do something I considered simple but I’m stuck.
I’ve got a drawing containing an alignment, a profile, a profile view, some assemblies and a corridor. I’d like to “mark” the start/end of all corridor regions in my profile view (with a (vertical) polyline or a point or something like that).

I started off by extracting the start/end-stations of all corridor regions which wasn’t too complicated.
Now I’d like to draw something at those stations in my (existing!) profile view.
If I were to create a new profile view I could use the “ProfileView.ByAlignmentPointName”-Node which takes “insertPoint” as an input. However, my profile view already exists and I need to get its insertion point.
I was only able to get the profile view’s bounding box with the “ProfileView.Extents”-Node but this only gives me height and length of my profile view and no absolute coordinates.

So, in short: Is there a way to query the insertion point coordinates of an existing profile view?


import sys
import clr


from Autodesk.AutoCAD.ApplicationServices import *
from Autodesk.AutoCAD.DatabaseServices import *
from Autodesk.AutoCAD.Geometry import *

from Autodesk.Civil.ApplicationServices import *
from Autodesk.Civil.DatabaseServices import *

from System.Collections.Generic import Dictionary

adoc = Application.DocumentManager.MdiActiveDocument
cdoc = CivilApplication.ActiveDocument

from Autodesk.DesignScript.Geometry import *

def get_profileView_info(profileViews):
	global adoc
	global cdoc
	output = []

	if not profileViews:
	if not isinstance(profileViews, list):
		profileViews = [profileViews]

	with adoc.LockDocument():
	    with adoc.Database as db:
	        with db.TransactionManager.StartTransaction() as t:
				for profileView in profileViews:			
					profileViewId = profileView.InternalObjectId
					obj = t.GetObject(profileViewId, OpenMode.ForRead)
					if isinstance(obj,ProfileView):
					   Profile_View_Name = obj.Name
	return output 		

OUT = get_profileView_info(IN[0])

A gentleman and a scholar! Both methods work great.
Thank you very much!

1 Like

As a little follow up:
Am I right that “ObjectExtensions.GetParameters” doesn’t retrieve the vertical exaggeration of my profile view? Is there a way to get this value?

can you find it


Sorry, I don’t follow:

I can’t find anything of interest here.

The vertical exaggeration value would also be necessary to find the lowest and highest point of my profile view (not the profile)

Sorry my English is not good

can i have a picture vertical exaggeration
and tomorrow I’m trying to help you


Thanks for your help and sorry for my late response!
This works for me as I’m trying do draw vertical lines from the lowest to the highest points of my profile view.
With this bounding box method I can retrieve the absolute height, regardless of the vertical exaggeration of my profile view.
(I’m still interested in how to get the value of the vertical exaggeration but I’ll open another thread for that matter so things don’t get to confusing)

Again - thank you for fast and qualified help! :slight_smile:

@pumpaij FYI there are some nodes in Camber to accomplish this.