Hi!
I received an error while running codes.
please help.
Avinash
Printable View
Hi!
I received an error while running codes.
please help.
Avinash
You can't create an instance of the Utility class. Besides, you're not saving much typing by assigning it to a variable. In fact you're just taking up more memory for the variable. Why not just use AcadDoc.Utility to call one of the methods? If you still want to use it, include it in your Imports statements
Imports AcadUtil = Autodesk.AutoCAD.Interop.AcadDocument.Utility
I was doing as per your said "AcadDoc.Utility" but still it give same error but location is different at " Pt1 = AcadDoc.Utility.PolarPoint(AngPnt, South, (15 + 4))"
Please suggest better option
- - - Updated - - -
I am using AutoCAD 2012 64Bit with Visual Studio 2015.
Is VBA working? Can you enter VBAIDE at the command line? I can't remember, but at one point vba was still 32bit. I think it was in 2014 that vba was upgraded to version 7/64bit. If vba is installed and working, but is 32bit, you won't be able to call COM objects from 64bit.
Here's a replacement function I got from the swamp.
Code:Private Function polarpoint(ByVal basept As Point3d, ByVal angle As Double, ByVal distance As Double) As Point3d
Return New Point3d(basept.X + (distance * Math.Cos(angle)), _
basept.Y + (distance * Math.Sin(angle)), _
basept.Z)
End Function