Kean Walmsley

July 2009

Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

Twitter Updates

    follow me on Twitter



    « Protecting intellectual property in AutoCAD application modules | Main | More on IP protection and obfuscation »

    January 18, 2007

    TrackBack

    TrackBack URL for this entry:
    http://www.typepad.com/services/trackback/6a00d83452464869e200d834e2489d53ef

    Listed below are links to weblogs that reference Managed application templates for VB and C# Express Editions:

    Comments

    Mr Kean
    i tried the above mentioned process and still no development if there is any document or a process chart to follow before and after installing Microsoft Visual Basic 2005 express edition and objectarx application wizard i would be glad to follow because i am totally lost.
    regards
    Arun Prasad.H

    Hi Arun,

    I'm afraid there isn't anything beyond what's in these blog entries... you might otherwise try posting to the AutoCAD .NET Discussion Group (at http://discussion.autodesk.com/forum.jspa?forumID=152).

    Regards,

    Kean

    Mr Kean
    Thanks a lot for all your time after many trails of copying your template into many folders of Microsoft Visual Basic 2005 Express Edition i could finally get the template working in my system when i copyed it to "F:\Program Files\Microsoft Visual Studio 8\VB\VBProjects" so thanks a lot.One more question you have said in the template to change the Asdk prefix do i have to change in the template only or do i have to add it to my register?

    regards

    Arun Prasad.H

    Hi Arun,

    You can either edit the template or change it in the created project - it's up to you.

    Regards,

    Kean

    Arun - You do not have to extract the template from the zip file in order to get it to work. In fact, for it to appear when put into the normal template directory, you must leave it as a zip file.

    By putting it in its extracted form in the folder that you have placed it, it appears as part of the standard templates and not as a user template. This could get overwritten or deleted in a future update.

    Try this. Create a new standard project. Export it to a template and have VS add it into your available templates at the same time with the option that it gives you. Check to see where the zip file has been placed - that´s where you need to place this template zip file as well.

    hi...
    I am developing GUI for a finite elment software and i have problem with the use of templates.Actually i am trying to make interface like as we have in SAP 2000(CSI product).I am using Visual Basic 2008 for this.So I need some help in context of Templates.

    Thank YOu
    Ratan

    Ratan,

    Sorry - these templates have been provided "as is", and I don't know what needs changing for them to work for VS 2008.

    Ultimately the structure of a .NET module for AutoCAD is really simple: create a standard Class Module and add in references to acmgd.dll and acdbmgd.dll, then copy & paste code from nearly any of my posts. That's all there is to it.

    Regards,

    Kean

    Mr. Kean,

    I have a problem, in VS 2005 C#, on declaring a variable that references a type that belongs in acmgd.dll and acdbmgd.dll.

    For example, just a simple declaration like: Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;

    Although, there is no compilation error, at runtime, when it tries to get into the function it gives me an exception "The type initializer for '' threw an exception.". At the InnerException info it says "The C++ module failed to load during process initialization.\n" on "msvcm80" as Source.

    Do you have an idea about that situation?

    Is your assembly being loaded by AutoCAD's NETLOAD command?

    Kean

    Mr, Kean,

    Thank you very much for your instant response!!

    No, I am still in the development process, inside Visual Studio.

    Bacos

    So what do you mean by "at runtime", then? You need to build a class library (DLL) that you load into AutoCAD.

    Kean

    I am building an external application that interacts with AutoCAD exhanging data.

    Bacos

    There's your problem: you can't use AutoCAD's .NET API out-of-process. You will need an in-process module (which you can launch and drive via COM, an AutoCAD API which does work across process boundaries).

    Please ask any follow-up questions via the AutoCAD .NET Discussion Group.

    Kean

    Indeed that was the problem. I just made a dll and called through AutoCAD and all worked fine.

    Thank you very much!

    Bacos

    Verify your Comment

    Previewing your Comment

    This is only a preview. Your comment has not yet been posted.

    Working...
    Your comment could not be posted. Error type:
    Your comment has been posted. Post another comment

    The letters and numbers you entered did not match the image. Please try again.

    As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

    Having trouble reading this image? View an alternate.

    Working...

    Post a comment

    Feed & Share

    Search