• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    AutoCAD 2010/2011/2012 DWG Format

    Reply
    Active Contributor
    M_Mogharabi
    Posts: 26
    Registered: ‎12-12-2011

    INTERNAL ERROR : !dbplotset.cpp@440 : elockviolation

    276 Views, 9 Replies
    12-24-2011 11:31 PM

    Hi,

    I have written some code in .net(c#) and send it to autocad command line to turn plotstamp log file off but after compeleting the command i have recieved this error :

     

    "INTERNAL ERROR : !dbplotset.cpp@440 : elockviolation".

     

    this is my code :

     

    AcadApplication acApp=(AcadApplication)Application.AcadApplication;
    
    acApp.ActiveDocument.SendCommand("defun c: PStamp() (Command \"_-PLOTSTAMP\" \"_LOG\" \"_NO\" \"PLOT.LOG\" \"\"))\n");
    
    acApp.ActiveDocument.SendCommand("PStamp\n");

     

     

    please help me... I have tried lots of ways and now i have no idea .

    Please use plain text.
    *Expert Elite*
    Posts: 6,417
    Registered: ‎06-29-2007

    Re: INTERNAL ERROR : !dbplotset.cpp@440 : elockviolation

    12-26-2011 02:11 PM in reply to: M_Mogharabi

    Hi,

     

    I don't think that this statements/2 code lines are the source of the problem, more possible is that you

    • forgot a document-lock object to dispose
    • forgot a transaction object to dispose
    • have an entity (or more) in read/write access "open"

     

    Try to define a command in a test application that does what you shows us, it will work if you don't start it within your app.

     

    Good luck, - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.
    Active Contributor
    M_Mogharabi
    Posts: 26
    Registered: ‎12-12-2011

    Re: INTERNAL ERROR : !dbplotset.cpp@440 : elockviolation

    12-26-2011 11:34 PM in reply to: alfred.neswadba

    Thanks alfred, I think that you'r right and that error did does not belong to these codes because i have removed these 2 line codes from my application and i had that error again, by the way i have this error message in my autocad command line :

     

    "Cannot create temporary plot stamp log file. plot not logged."

     

    Note : My application is opening a dwg file in autocad with following code :

     

    DocumentCollection dm = Application.DocumentManager;
    Document doc = null;
    doc = dm.Open(@"\\server\sharedfolder\projects\file1.dwg");
    
    Application.DocumentManager.MdiActiveDocument = doc;

     and then trying to plot it to printer by this code. but i received these 2 errors, one (Internal Error) in a message box and the other in command line and finally the autocad software is closed.

     

    Do you know what is the reason?!!! I am too confused....

     

     

     

    Please use plain text.
    *Expert Elite*
    Posts: 6,417
    Registered: ‎06-29-2007

    Re: INTERNAL ERROR : !dbplotset.cpp@440 : elockviolation

    12-26-2011 11:44 PM in reply to: M_Mogharabi

    Hi,

     

    >> Do you know what is the reason?

    No sorry, I don't. ;(

    I can't imagine that Keans code does not work. It may be possible that there are some settings on your maching that don't match to the code, e.g. you have some printers defined that don't exist any more or something like that.

     

    >> Cannot create temporary plot stamp log file. plot not logged

    Is a message that does not necessarily have to do anything with your code. Look to >>>these search results<<< what could be the reasons for this message also.

     

    Good luck, - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.
    Active Contributor
    M_Mogharabi
    Posts: 26
    Registered: ‎12-12-2011

    Re: INTERNAL ERROR : !dbplotset.cpp@440 : elockviolation

    12-27-2011 01:06 AM in reply to: alfred.neswadba

    Thanks again for your immediate reply,

    I have solved those errors , but now i have another problem. now plotting process doing successfully however when i looked at Plot and Publish Details window i saw that the File property is set to <UnSaved Drawing> instead of my dwg file name.

     

    I mean something like this :

     

    Sheet :UnsavedDwg_2-Model - Plotted

        File : <UnSaved Drawing>

        Category name :

        Page setup :

        Device name : \\server\MyPrinterName

        Plot file path :

        Paper size : Letter

    Please use plain text.
    *Expert Elite*
    Posts: 6,417
    Registered: ‎06-29-2007

    Re: INTERNAL ERROR : !dbplotset.cpp@440 : elockviolation

    12-27-2011 02:51 AM in reply to: M_Mogharabi

    Hi,

     

    I can only guess: you modify the page-setup for a layout, so your drawing is in modified/unsaved state. This makes the message you get to a true condition.

     

    - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.
    Active Contributor
    M_Mogharabi
    Posts: 26
    Registered: ‎12-12-2011

    Re: INTERNAL ERROR : !dbplotset.cpp@440 : elockviolation

    12-31-2011 08:56 PM in reply to: alfred.neswadba

    Hi alfred,

     

    No, I did not write any code between opening and plotting codes to modify my dwg file.Do you know how can i distingouish that the page-setup is modified or not??

    Please use plain text.
    *Expert Elite*
    Posts: 6,417
    Registered: ‎06-29-2007

    Re: INTERNAL ERROR : !dbplotset.cpp@440 : elockviolation

    01-03-2012 01:45 PM in reply to: M_Mogharabi

    Hi,

     

    as long as you don't need a transaction-commit (working managed) you didn't do any modifications. If you need that, you have modified something.

    If you are working via COM, it's every modification to a database-entity.

     

    - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.
    Active Contributor
    M_Mogharabi
    Posts: 26
    Registered: ‎12-12-2011

    Re: INTERNAL ERROR : !dbplotset.cpp@440 : elockviolation

    01-03-2012 10:44 PM in reply to: alfred.neswadba

    Hi alfred,

    Excuse me but i am too begginer in this field, please describe me how can i avoid my dwg file from changing when i want to open and plot it?

    Please use plain text.
    *Expert Elite*
    Posts: 6,417
    Registered: ‎06-29-2007

    Re: INTERNAL ERROR : !dbplotset.cpp@440 : elockviolation

    01-04-2012 02:14 AM in reply to: M_Mogharabi

    Hi,

     

    >> how can i avoid my dwg file from changing

    Sorry, you can't avoid the user to make changes, you just can make sure that your application does not change anything in your document .... or when it's necessary make sure you have all TransActions disposed and also (if used) all DocumentLock's are disposed.

     

    - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.