Author Topic: Property Set Formula - Help - Alignment Station on Cogo Point  (Read 78 times)

0 Members and 1 Guest are viewing this topic.

Rod

  • Newt
  • Posts: 64
Property Set Formula - Help - Alignment Station on Cogo Point
« 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.
« Last Edit: February 14, 2018, 03:57:27 PM by Rod »

Rod

  • Newt
  • Posts: 64
Re: Cogo Point Property Set for Alignment Station
« Reply #1 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)

Rod

  • Newt
  • Posts: 64
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