TheSwamp
Code Red => .NET => Topic started by: sdunn on May 16, 2016, 01:07:35 PM
-
I am using Civil 3d2015 and need to calculate the location of a point on a featureline so that I can add an elevation point. I found the COM Get2dDistanceAtPoint() function, but I am having trouble getting it to work.
Function Get2dDistanceAtPoint(varPoint As Object) As Double
Member of Autodesk.AECC.Interop.Land.IAeccLandFeatureLine
I have tried passing it a 2d and 3d point with no success. Does anyone know what this is looking for and more importantly, how do you go about finding what is needed if a function or method does not use a specific type?
-
Most all C3D COM methods/properties use an array of doubles, cast as an object, when a 2d or 3d point is needed, so that wold be the first thing I'd try.
-
Thank you for the information Jeff.
The format below is not working. Am I creating the array incorrectly?
Dim pt1 As Double() = {5000.0, 5000.0}
Dim pt1obj As Object = pt1
Dim LineSta As Double = ofeatline.Get2dDistanceAtPoint(pt1obj)
-
It probably is expecting a z value as well. Another way would be to just take your Point3d (assuming you already have this form a GetPoint or some other method) and use the ToArray() method.
-
Jeff,
That did it. Is this documented somewhere or is there other way to determine what a function/method is looking for?
thank you again!
Stacy