Dear All,
We using acedTrans function in AutoCAD 2012 and previous version, and it worked fine.
[DllImport("acad.exe", CallingConvention=CallingConvention.Cdecl, EntryPoint="acedTrans")] static extern int acedTrans(double[] point, IntPtr fromRb, IntPtr toRb, int disp, double[] result);
Kean had a post introduct this code: http://through-the-interface.typepad.com/through_the_interface/2007/10/plotting-a-wind.html
but after we migrate it to AutoCAD 2013, there is a error message: Unable to find an entity point named 'acedTrans' in dll 'acad.exe'
We can't find the reference sample from the objectARX for 2013 version, it's any change for 2013?
Thanks!
Rick
Additional info for AutoCAD 2015.
Its name is _acedTrans in AutoCAD 2015 x86, and acedTrans in AutoCAD 2015 x64. So, as a variant:
#if AUTOCAD_NEWER_THAN_2012 const String acedTransOwner = "accore.dll"; #else const String acedTransOwner = "acad.exe"; #endif #if AUTOCAD_NEWER_THAN_2014 const String acedTrans_x86_Prefix = "_"; #else const String acedTrans_x86_Prefix = ""; #endif const String acedTransName = "acedTrans"; [DllImport(acedTransOwner, CallingConvention = CallingConvention.Cdecl, EntryPoint = acedTrans_x86_Prefix + acedTransName)] static extern Int32 acedTrans_x86(Double[] point, IntPtr fromRb, IntPtr toRb, Int32 disp, Double[] result); [DllImport(acedTransOwner, CallingConvention = CallingConvention.Cdecl, EntryPoint = acedTrans_x86_Prefix + acedTransName)] static extern Int32 acedTrans_x64(Double[] point, IntPtr fromRb, IntPtr toRb, Int32 disp, Double[] result); public static Int32 acedTrans(Double[] point, IntPtr fromRb, IntPtr toRb, Int32 disp, Double[] result) { if(IntPtr.Size == 4) return acedTrans_x86(point, fromRb, toRb, disp, result); else return acedTrans_x64(point, fromRb, toRb, disp, result); }
Misprint for acedTrans_x64. This is right:
[DllImport(acedTransOwner, CallingConvention = CallingConvention.Cdecl, EntryPoint = acedTransName)] static extern Int32 acedTrans_x64(Double[] point, IntPtr fromRb, IntPtr toRb, Int32 disp, Double[] result);