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

0 Members and 1 Guest are viewing this topic.

Rod

  • Newt
  • Posts: 73
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: 73
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: 73
Re: Property Set Formula - Help - Alignment Station on Cogo Point
« Reply #2 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

Mark

  • Custom Title
  • Administrator
  • Seagull
  • Posts: 28463
Re: Property Set Formula - Help - Alignment Station on Cogo Point
« Reply #3 on: February 20, 2018, 08:19:34 AM »
Thanks Rod. :)
TheSwamp.org  (serving the CAD community since 2003)

Jeff_M

  • King Gator
  • Posts: 3916
  • C3D user & customizer
Re: Property Set Formula - Help - Alignment Station on Cogo Point
« Reply #4 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

Rod

  • Newt
  • Posts: 73
Re: Property Set Formula - Help - Alignment Station on Cogo Point
« Reply #5 on: February 22, 2018, 09:50:14 PM »
Thanks Jeff.
Was a one off. Those Sincpac tools look awesome though.
Cheers, Rod.