AutoCAD 2013

608 views
Skip to first unread message

Michael

unread,
Apr 29, 2012, 11:06:47 PM4/29/12
to gallio-dev
Will there be a new version released that supports AutoCAD 2013?

2013 is a major, binary-incompatible release. Every third release of
AutoCAD is a major version bump.

Kind regards
Michael

Mike Sandberg

unread,
Apr 30, 2012, 2:37:35 PM4/30/12
to gallio-dev
Hi Michael,

One of my coworkers has created a fix for this that we're using
internally. The issue is that the CommandMethodAttribute and Editor
types moved from AcMgd.dll to AcCoreMgd.dll in AutoCAD 2013. This
causes Gallio trouble  (bindings fail) when it tries to load its
AutoCAD plugin. I'll try and get this fix ported over to the
googlecode repository some time this week.

-Mike.

Mike Sandberg

unread,
May 4, 2012, 4:37:24 PM5/4/12
to galli...@googlegroups.com
Hi Michael, 

I just committed support for AutoCAD 2013 with r3327. Let me know if it's not working for you.

-Mike.

David Wolfe

unread,
May 25, 2012, 7:35:18 AM5/25/12
to galli...@googlegroups.com
Are you planning on using the new autoloader format?  I can help put that together if needed.  Basically, you can put a folder with a plugin, and an xml file in

C:\Users\All Users\Autodesk\ApplicationPlugins

or 
C:\Users\Usernamed\Autodesk\ApplicactionPlugins and Autocad will load it automatically.

Mike Sandberg

unread,
May 30, 2012, 12:15:13 PM5/30/12
to galli...@googlegroups.com

On Friday, May 25, 2012 4:35:18 AM UTC-7, David Wolfe wrote:
Are you planning on using the new autoloader format?  I can help put that together if needed.  Basically, you can put a folder with a plugin, and an xml file in

C:\Users\All Users\Autodesk\ApplicationPlugins

or 
C:\Users\Usernamed\Autodesk\ApplicactionPlugins and Autocad will load it automatically.

Hi David,

Thanks for your offer. Is the current way the test runner is loading into AutoCAD not working for you? Are you using Icarus to run your tests?

-Mike.

David Wolfe

unread,
Jun 1, 2012, 8:54:28 AM6/1/12
to galli...@googlegroups.com
I haven't had a chance to test the 2013 compatible build yet.  I just wondering if the loader was going to change.  Do I need to download the source and build r3327 myself to test it?

Mike Sandberg

unread,
Jun 2, 2012, 3:18:33 PM6/2/12
to galli...@googlegroups.com
On Friday, June 1, 2012 5:54:28 AM UTC-7, David Wolfe wrote:
I haven't had a chance to test the 2013 compatible build yet.  I just wondering if the loader was going to change.  Do I need to download the source and build r3327 myself to test it?

Yes, that would be the quickest way. I don't know when the next release will be posted on the website and the CI server has been down for a while now.

Eduard-Cristian Stefan

unread,
Jun 2, 2012, 3:54:00 PM6/2/12
to galli...@googlegroups.com, Mike Sandberg, dave....@ecadinc.com
Take a look here:

https://bitbucket.org/alexandrul/mb-unit

Have a nice day,
Eduard

Andrey Bushman

unread,
Sep 1, 2012, 12:28:55 PM9/1/12
to galli...@googlegroups.com
Hi all. I apologize for my bad English. 
I never used Gallio, but I need to write unit tests for AutoCAD 2009-2013. I have a little experience of writing unit tests via NUnit, but I can't find samples for Gallio. Official Gallio samples is empty. I need the training articles, and the simple samples for using Gallio and for writing  unit tests for AutoCAD via Gallio. Help me, please.

Best Regards, Andrey

понедельник, 30 апреля 2012 г., 7:06:47 UTC+4 пользователь Michael написал:

Andrey Bushman

unread,
Sep 13, 2012, 4:47:56 AM9/13/12
to galli...@googlegroups.com
Nobody knows how it working? Why to include in Gallio the modules, if nobody knows as it working?


понедельник, 30 апреля 2012 г., 7:06:47 UTC+4 пользователь Michael написал:
Will there be a new version released that supports AutoCAD 2013?

David Wolfe

unread,
Sep 13, 2012, 8:24:02 AM9/13/12
to galli...@googlegroups.com
It pretty much works like the rest of the unit testing package.  You just have to tell it to launch AutoCAD to load the test dll.  The hardest thing about Gallio is making sure you have all the dependencies in the test project.  It errors out if there are some missing, and it doesn't necessarily tell you which ones up front.

--
You received this message because you are subscribed to the Google Groups "gallio-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/gallio-dev/-/UUxC2XSYH8IJ.

To post to this group, send email to galli...@googlegroups.com.
To unsubscribe from this group, send email to gallio-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gallio-dev?hl=en.

Andrey Bushman

unread,
Sep 13, 2012, 2:02:40 PM9/13/12
to galli...@googlegroups.com
Thank you for the answer, David.
Does you has write unit tests for AutoCAD on Gallio? I need a detailed example. Without such sample nobody can use Gallio on AutoCAD unit testing. Can you teach me, please?

Best Regards

четверг, 13 сентября 2012 г., 16:24:03 UTC+4 пользователь David Wolfe написал:

David Wolfe

unread,
Sep 13, 2012, 3:16:47 PM9/13/12
to galli...@googlegroups.com
Here's a sample code from a test case I wrote.  Like I said, the sample from Gallio docs are straightforward.  You have to set the test runner to AutoCAD, and then indicate how you want to start AutoCAD but other than that it's pretty easy.

Test Class:

    [TestFixture]
    public class TestAcad
    {
        static string dwgfile = @"C:\Users\dave.wolfe.S-VILLE-ECAD\Documents\ECAD\Development\CADWorx Files\PIDTest_10.DWG";
        [Test]
        public void OpenFile()
        {
            DrawingManagement.OpenFile(dwgfile);
            //now we have to make sure the current document inside of AutoCAD
            Document doc = Application.DocumentManager.MdiActiveDocument;
            //make sure our file names match
            Assert.IsTrue(string.Compare(doc.Name, dwgfile, true) == 0);
        }
    }

Code to be tested:
    public class DrawingManagement
    {
        /// <summary>
        /// Opens a file inside of AutoCAD
        /// </summary>
        /// <param name="filename"></param>
        public static void OpenFile(string filename)
        {
            //Application.DocumentManager.Open(filename);
            ResultBuffer rb = new ResultBuffer();
            rb.Add(new TypedValue(5005, "FILEOPEN"));
            rb.Add(new TypedValue(5005, filename));
            ECAD.AutoCADManager.Commanding.Command(rb);
        }
    }

--
You received this message because you are subscribed to the Google Groups "gallio-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/gallio-dev/-/ltX8WVOcKKEJ.

Андрей Бушман

unread,
Sep 13, 2012, 3:54:16 PM9/13/12
to galli...@googlegroups.com
Thank you. 
I am trying to run it code. I create new project in MS Visual Studio 2012 and set .Net Framework 4.0 as target platform. I want to use it at AutoCAD 2013. Will it working with AutoCAD 2013 and .Net Framework 4.0?

I have added such references:

- AcCoreMgd, AcDbMgd and AcMgd (with CopyLocal = false).
- Gallio and MbUnit.

What libraries I must to add additional? What is "ECAD" in your code? Which application I must select in tab "Debug" -> "Start External Program" of my project properties? What I need to make, that it earned?

Best Regards

2012/9/13 David Wolfe <dave.wo...@gmail.com>

Андрей Бушман

unread,
Sep 13, 2012, 4:11:48 PM9/13/12
to galli...@googlegroups.com
And I set such settings in GUI:

Встроенное изображение 1

2012/9/13 Андрей Бушман <bushman...@gmail.com>
image.png

David Wolfe

unread,
Sep 13, 2012, 5:01:16 PM9/13/12
to galli...@googlegroups.com
That code was just an illustrative sample, you'll have to make you're own test case. I just ran my code on Plant 3D 2013, so I'm sure AutoCAD will work.  You have the right references.  ECAD is from my own code framework.  Make sure under settings Gallio > Runner > Test Runner Factory, that AutoCAD is selected.  That is a key that I missed for a while.
image.png
Reply all
Reply to author
Forward
0 new messages