AutoCAD IOThe title of this post is probably a bit misleading: I'm not actually going to show how this works, today, but I do intend to plot a path for addressing this topic over the coming weeks.

I was spurred on by a tweet I received a couple of hours ago:

The short answer to this is "yes, it's absolutely possible!". But readers of this blog are clearly interested in details, so that's where I want to get to.

In the last post I mentioned the two class proposals I've submitted for AU2015: one deals with VR and the other with AutoCAD I/O. The second class will focus, in particular, on how to leverage your own .NET modules in an AutoCAD I/O application. The class will be fuelled, as usual, by a series of posts I publish on this blog.

This is what I have in mind, specifically: you may remember the jigsaw generation application we saw a few weeks ago. I want to extend this app, implementing a command that will generate – from scratch, no existing geometry up our sleeves – a jigsaw of a given physical size and of an approximate number of pieces. That's code I'm going to show in the next post.

I then want to build a web-site around this core AutoCAD app. This will involve making sure the module works in the Core Console – which is the component driving AutoCAD I/O – and then that we can create an app package for AutoCAD I/O to load the module, allowing us to execute scripts to generate jigsaws in the cloud.

The HTML page is going to do a bit more than just allowing the user to enter the dimensions and number of pieces, though: I'd like the user to be able to upload a custom image (or photo) via the site, and we'll then create a drawing that can be used to laser-cut the puzzle but also to engrave the image onto it. Laser-engraving a full colour image is (as far as I'm aware) impossible, so this is going to be a little tricky. The idea is to use some image processing/computer vision techniques to create a monochrome pattern to be engraved: we'll do some edge detection – either in the browser or in the cloud, we'll see – and then propose that to the user in some way before they click on "generate my puzzle". And "here are my credit card details", of course. 😉

The eventual aim would be to automate the preparation and dispatch of the physical puzzle, but that's a bit out of the scope for an AU session, where we'll probably just take a look at the resultant DWG file.

But the point is this: we could be using a .NET application inside AutoCAD I/O to do much of the heavy-lifting for this web-site, and the user will never even know. They won't see a DWG file and they may not even see much by way of graphics (although I expect we'll generate an image preview to show before the purchase is finalised).

This is exactly the kind of scenario we expect to see AutoCAD I/O used for, over time. And the great opportunity, here, is that you can make use of your existing .NET application code to take advantage of it.

I think this is pretty exciting… we'll see how it all takes shape over the coming weeks!

8 responses to “AutoCAD I/O and custom applications”

  1. Albert Szilvasy Avatar
    Albert Szilvasy

    If you can't wait a couple of weeks then see this sample on github that shows how to run .net code in AutoCAD.IO:
    1

  2. James Maeding Avatar

    Kean, the subject of running acad remotely always brings up the setup of the environment, in terms of support paths and other things. So lets say some lisp needs to choose a block from a company folder of blocks. Can the IO be set up to have access (through support paths) to local things? In particular, I would want the IO to run my acaddoc.lsp when it starts. If not available currently, will it ever be? I consider that minimum functionality to run acad remotely for things our company does. thanks

    1. Kean Walmsley Avatar

      The Core Console (and AutoCAD I/O) will only run a subset of LISP, just as they only support a subset of AutoCAD's .NET API.

      Be careful of thinking of AutoCAD I/O as AutoCAD in the cloud. It's really the Core Console in the cloud.

      Kean

      1. james maeding Avatar

        Well the web page on IO says we can plot drawings, but you would want the fonts available same as on your computer, and maybe shape files too for linetypes. Also, core console still issues modal nag screen warnings about missing coordinate systems on some drawings. What environment does IO assume for its operations? an OOTB acad install?

        1. Kean Walmsley Avatar

          I know the team is working on extending the set of fonts available. As far as I'm aware you have the ability to provide additional ones as a developer, but I'll find out more as I look into that. The best way to get a definitive answer is via the AutoCAD I/O forum.

          Kean

          1. I just loked for that forum using both google and looking all over the DG page. I cannot find it.

  3. Kean Walmsley Avatar

    Sorry, James - I should have at least provided the link. I usually go to developer.autodesk.com and select Support -> Forums.

    You can also get to it from here:

    forums.autodesk.com/

    And even more directly:

    forums.autodesk.com/

    Kean

  4. I guess web services api did not make me think of it. I wish the list of forums was more like a treeview that I could expand. I did find with google once I said I/O, not IO...thx

Leave a Reply to james Cancel reply

Your email address will not be published. Required fields are marked *