TheSwamp

CAD Forums => Vertically Challenged => Land Lubber / Geographically Positioned => Topic started by: Rod on February 12, 2018, 08:29:31 PM

Title: Property Set Formula - Help - Alignment Station on Cogo Point
Post 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.
Title: Re: Cogo Point Property Set for Alignment Station
Post by: Rod on February 13, 2018, 04:16:21 PM
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)
Title: Re: Property Set Formula - Help - Alignment Station on Cogo Point
Post by: Rod on February 19, 2018, 04:35:41 PM
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
Title: Re: Property Set Formula - Help - Alignment Station on Cogo Point
Post by: Mark on February 20, 2018, 08:19:34 AM
Thanks Rod. :)
Title: Re: Property Set Formula - Help - Alignment Station on Cogo Point
Post by: Jeff_M on February 20, 2018, 12:59:38 PM
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
Title: Re: Property Set Formula - Help - Alignment Station on Cogo Point
Post by: Rod on February 22, 2018, 09:50:14 PM
Thanks Jeff.
Was a one off. Those Sincpac tools look awesome though.
Cheers, Rod.