TheSwamp
CAD Forums => Vertically Challenged => Land Lubber / Geographically Positioned => Topic started by: Rod on February 12, 2018, 08:29:31 PM
-
I'm trying to create the station of an alignment as property set data for a cogo point.
I am able to extract the cogo point easting, the cogo point northing abnd the alignment name (from the alignment handle)
However I am having trouble using the stationoffset method of the alignment.
Can I use methods in property sets?
How do I declare the variables for the station and offset?
Do I need to convert my easting and northind into a type double?
Here is where I am up to
RESULT="-"
On Error Resume Next
Set oApp=GetObject(, "AutoCAD.Application")
Set oCivilApp=oApp.GetInterfaceObject("AeccXUiLand.AeccApplication.11.0")
Set obj=oCivilApp.ActiveDocument.HandleToObject("BE7")
Dim Objstation As Double = 0.0
Dim ObjOffset As Double = 0.0
obj.StationOffset([Easting],[Northing],Objstation,ObjOffset)
RESULT=Objstation
Cheers, Rod.
-
I'm a little bit closer in that I am no longer getting an error.
To check the data type I changed my code to this but I always get empty
RESULT="-"
On Error Resume Next
Set oApp=GetObject(, "AutoCAD.Application")
Set oCivilApp=oApp.GetInterfaceObject("AeccXUiLand.AeccApplication.11.0")
Set obj=oCivilApp.ActiveDocument.HandleToObject("BE7")
Dim ObjStation
Dim ObjOffset
obj.StationOffset [Easting], [Northing], ObjStation, ObjOffset
RESULT=Typename (ObjStation)
-
For anyone trying to do something similar I was able to get around this by running the report "Station Offset to Points" and re-importing the points from the file.
Cheers, Rod
-
Thanks Rod. :)
-
Rod, if this is something you need to do often, and would like for it to be dynamic, you may be interested in this:
http://www.quuxsoft.com/SincpacC3D_Help/SP_DLPoints.htm
-
Thanks Jeff.
Was a one off. Those Sincpac tools look awesome though.
Cheers, Rod.