I want to get the Points of the Start.Pipe and End.Pipe on the profie view, I need your help!
Thanks in advance…
Is this what you’re looking for?
Great! Can you give me the file .dyn.
Here is what I came up with to roughly place mtext invert labels. I highly suggest using what Zachri has made though as he is much more experienced. But perhaps you can scrub something out of my novice late night stream of conscious coding! Cheers.Invert Labels.dyn (42.6 KB)
Here’s the Python script.
IN = Profile View object
IN = station (or list of stations)
IN = elevation (or list of elevations)
The number of stations should match the number of elevations.
import sys import clr clr.AddReference('AcMgd') clr.AddReference('AcDbMgd') clr.AddReference('AeccDbMgd') clr.AddReference('ProtoGeometry') from Autodesk.AutoCAD.ApplicationServices import * from Autodesk.AutoCAD.DatabaseServices import * from Autodesk.Civil.DatabaseServices import * adoc = Application.DocumentManager.MdiActiveDocument from Autodesk.DesignScript.Geometry import * def get_profile_view_points(profileView, station, elevation): global adoc output =  if not isinstance(station, list) and not isinstance(elevation, list): station = [station] elevation = [elevation] with adoc.LockDocument(): with adoc.Database as db: with db.TransactionManager.StartTransaction() as t: for i in range(0, len(station)): oid = profileView.InternalObjectId obj = t.GetObject(oid, OpenMode.ForRead) if isinstance(obj, ProfileView): flag, x, y = obj.FindXYAtStationAndElevation(station[i], elevation[i], 0, 0) output.append(Point.ByCoordinates(x, y, 0)) t.Commit() return output OUT = get_profile_view_points(IN, IN, IN)
Hi @mzjensen ,
Why list of station Pipe All equal to zero.
Do the pipes have a reference alignment set?