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



    « Allowing selection of an AutoCAD plot device and media name using .NET | Main | Free webcast: "AutoCAD: .NET for LISP Programmers" »

    October 11, 2007

    TrackBack

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

    Listed below are links to weblogs that reference Plotting a window from AutoCAD using .NET:

    » Plotting a window from AutoCAD using .NET from CadKicks.com
    You've been kicked (a good thing) - Trackback from CadKicks.com [Read More]

    Comments

    Hi Kean.

    You can use Point3d directly in P/Invoke where the parameter is an ads_point (note the use of the 'out' param modifier for output params):


    static extern int acedTrans( Point3d point, IntPtr fromRb, IntPtr toRb, int disp, out Point3d result );

    Thanks, Tony.

    In this case it doesn't really improve the flow of the code, as we need to create an Extents2d object from the results. But it's certainly a good tip for cases where Point3ds are to be used afterwards.

    Regards,

    Kean

    Hello Kean,

    I am trying to print Autocad file using .NET windows application. I am not able to find Autodesk in my using function. Can you guide me how to do this?
    It will be better if I could get code to accomplish this. I have autocad 2007 installed in my system.

    Thanks and Warm Regards,
    Sudarshan

    Hi Sudarshan,

    You will need to set a project reference to acmgd.dll and acdbmgd.dll (in the AutoCAD install folder).

    Check out this introductory post, which talks about using the ObjectARX Wizard to set your project up.

    Regards,

    Kean

    Hi Kean,

    Thank you for the reply. I am able to set project references. How do I print the Autocad drawing from .NET? I was not able to find the solutions on internet.
    Is there any function in Autocad that can take path of drawing and print it to printer?


    Regards,

    Sudarshan

    Hi Sudarshan,

    Not a single function - there's a complete Plotting API that does this. Take a look at the posts under "Plotting".

    Regards,

    Kean

    Hi Kean,

    Can you send me code from which I can achieve plotting of drawing from .NET?
    I had a look at the plotting, but was not able to understand since input is taken from Autocad.

    I am in really need of this.

    Regards,
    Sudarshan

    Sudarshan - I don't understand what it is you want that's different from what's posted. All those posts plot drawings in different ways (whether single or multi-sheet, or with/without preview).

    If you're trying to do this without AutoCAD running (which you did not state in your previous comments) then it won't work, I'm afraid.

    Regards,

    Kean

    Hi Kean,

    Can you send the project file to my email id? I will try to trace the application from beginning. Also I am not able to incorporate your code into my application.


    regards,
    Sudarshan

    Hi Sudarshan,

    I'm sorry - if I start providing this kind of custom support, it'll never end. I help when there are specific issues with my posts, but otherwise it's just not feasible.

    Please post to the .NET discussion group or request help from my team via the Autodesk Developer Network (if you're a member).

    Also, the AutoCAD Developer Center has a lot of helpful "getting started" information, including some Labs for AutoCAD .NET.

    Regards,

    Kean

    Kean,

    When I include your code into my application it says " Application' is an ambiguous reference". Can you guide me how to solve this error?

    Regards,
    Sudarshan

    Sudarshan,

    It's probably because you're including System.Windows.Forms:

    using System.Windows.Forms;

    Both this and Autodesk.AutoCAD.ApplicationServices include an Application type. So you need to disambiguate the use of Application by prefixing the use of Application with the relevant namespace (for instance).

    Regards,

    Kean

    How do I solver this error?

    An unhandled exception of type 'System.IO.FileNotFoundException' occurred in WindowsApplication6.exe

    Additional information: File or assembly name acdbmgd, or one of its dependencies, was not found.

    Regards,
    Sudarshan

    Sudarshan - please post your introductory support-related question to the ADN team or the .NET discussion group.

    Regards,

    Kean

    I shall do that Kean.
    Is there any way to Converting autocad drawing into PDF format?

    Regards,
    Sudarshan

    You will need to plot. You can use the standard "DWG to PDF.pc3" device or a 3rd party printer driver.

    Kean

    What has to be included to get AutoDesk.AutoCAD.Interop.Application?

    Sudarshan

    Kean,
    Can you tell me which part of code has to be used just to plot(Without selecting the points)? I need to plot the drawing file.


    Sudarshan

    Good stuff Kean,
    You've been kicked (a good thing) - Trackback from CadKicks.com
    http://www.cadkicks.com/adkautocad/Plotting_a_window_from_AutoCAD_using_NET

    Can anybody explain howthe code works

    Sony -

    I'd suggest downloading the ObjectARX SDK (http://www.autodesk.com/objectarx) and looking at the documentation... it is mainly covering ObjectARX, but the .NET layer is very "thin", so the descriptions should be adequate for both environments (although not ideal).

    Kean

    Thanks Kean,


    Actually i wanted to ask can i get sample code for custom plotting of autocad layout drawings from .net using vb.net.My application will be having a interface where it will show the plotter set,and also scale options and user can select any layout which displayed in the listbox provided.

    basically a plotter manager .net application which will take layout drawings and send it for plotting according to the settings made by the user.

    And i also wanted a sample code as how to convert Autocad file to PDF Format without opening autocad

    i want to load a dll automatically when autocad 2008 opens instead of using netload.can any one help?

    how to avoid proxy information dialog box from appearing while openeing a autocad civil 3d 2008 drawing in autocad 2008.

    Proxy information:Drawing contains objectARX entities.

    Sony,

    Please post your questions to the AutoCAD .NET Discussion Group - this is not the right forum.

    BTW - check out this post for the automatic loading question.

    Regards,

    Kean

    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