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

    .NET

    Reply
    Active Member
    phil
    Posts: 9
    Registered: ‎06-24-2010

    GetAcadDocument

    360 Views, 2 Replies
    03-28-2012 04:31 PM

    I'm having trouble trying to get the GetAcadDocument method to work.

     

    2012 code:

    ThisDrawing = DocumentManager.MdiActiveDocument.AcadDocument

     

    2013:

    ThisDrawing = DocumentExtension.GetAcadDocument(Application.DocumentManager.MdiActiveDocument)

     

    Produces a run time error.  I know just enough .net to brute force my app to do what I want and would appreciate any help.

     

    Thanks,

    Phil

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

    Re: GetAcadDocument

    03-28-2012 11:29 PM in reply to: phil

    Hi,

     

    for me it's running (it used time to find the alternative to .AcadDocument but with the method same to yours it's working for me. How is ThisDrawing declared at your code, what runtime-error do you get exactly?

     

    - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.
    Active Member
    phil
    Posts: 9
    Registered: ‎06-24-2010

    Re: GetAcadDocument

    03-29-2012 08:44 AM in reply to: alfred.neswadba

    Thanks for the response Alfred...confirming the code was ok made me look for a more fundamental problem and I realized I had a bad reference.

    Please use plain text.