DWGTITLED in .NET

Discussion in 'AutoCAD' started by Zatopek, Sep 10, 2004.

  1. Zatopek

    Zatopek Guest

    How do i find out if the dwg has been saved from .NET?
    I can't find the variable DWGTITLED.

    Any tips??

    /Mats
     
    Zatopek, Sep 10, 2004
    #1
  2. Check the FullName property or try GetVariable.
     
    Frank Oquendo, Sep 10, 2004
    #2
  3. Zatopek

    Zatopek Guest

    Do you mean FileName?

    FileName doesn't do it.
    It contains the name of the dwt-file before it has been saved.

    Where do i find GetVariable?
    I cannot find it on database.

    /M
     
    Zatopek, Sep 10, 2004
    #3
  4. FileName doesn't do it.
    Then that can be your test. If it is the dwt name then obviously it hasn't
    been saved yet.

    -- Mike
    ___________________________
    Mike Tuersley
    CADalyst's CAD Clinic
    Rand IMAGINiT Technologies
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Sep 10, 2004
    #4
  5. Zatopek

    Zatopek Guest

    But I can work in an dwt. (not likely, but i can)

    I just want to get the value from the dwgtitled variable.
    It keeps all the info i need.

    How do i get the value in a setvar from .net?
    (getvar "dwgtitled") in lisp.
     
    Zatopek, Sep 10, 2004
    #5
  6. DWGTITLED indicates if a new drawing was saved. Testing
    the filename doesn't work because a user can open a .DWT.

    He can get the Document object and from it, get the
    AcadDocument ActiveX object, and then use the GetVariable
    method.

    The managed wrapper API for AutoCAD is a work in progress,
    not done, and using it without the ActiveX API is unrealistic.

    FWIW, in ObjectARX, this requires accessing the MFC
    CDocument object for the open document, so there is
    likely no equivalent in the managed API.
     
    Tony Tanzillo, Sep 10, 2004
    #6
  7. Well assuming you are using the COM interop, its just
    ActveDocument.GetVariable("Whatever_variable_name_you_type_here"). If that
    doesn't make sense, look in the help file.

    -- Mike
    ___________________________
    Mike Tuersley
    CADalyst's CAD Clinic
    Rand IMAGINiT Technologies
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Sep 10, 2004
    #7
  8. Zatopek

    Zatopek Guest

    So what you are saying is that there a no straight forward .NET method to
    get that variable, or any other variable.
    But i has to go through Active X.

    Have i understod you right?

    /M
     
    Zatopek, Sep 10, 2004
    #8
  9. That is correct.

    Frankly, ActiveX is far more reliable than the managed API to begin with.

    Even with its superior access, I've all but given up on the managed API.
     
    Frank Oquendo, Sep 10, 2004
    #9
  10. In AutoCAD 2005 the .NET API won't do everything you need and you will have
    to use the COM API. Hopefully, we can change your mind in couple of
    releases.

    Albert
     
    Albert Szilvasy \(Autodesk\), Sep 13, 2004
    #10
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.