• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • AutoCAD Electrical

    Reply
    Active Contributor
    Posts: 46
    Registered: ‎04-20-2005

    DWGDESC Value

    241 Views, 8 Replies
    05-22-2006 11:31 AM
    Where is the the value for DWGDESC and sheet
    or DD1 DD2 DD3 stored in ACADE 2007?
    I wrote a VBA routine to obtain these values from a converted project and would like to place them to be used by the update title block functions.

    Joe
    Please use plain text.
    *Pat Murnen \(Autodesk\)

    Re: DWGDESC Value

    05-22-2006 12:39 PM in reply to: joechrobak
    You can retrieve the project information using some of the API calls
    provided.

    (ace_getactiveproject) returns the active project's name.

    (c:ace_proj_data projname) returns a list of lists with all the data for
    each drawing within the project. The values you are looking for will be in
    this return.

    All this information is held in the project's .wdp file if you can't use
    these API calls to retrieve the information for any reason.

    Pat Murnen


    wrote in message news:5182405@discussion.autodesk.com...
    Where is the the value for DWGDESC and sheet
    or DD1 DD2 DD3 stored in ACADE 2007?
    I wrote a VBA routine to obtain these values from a converted project and
    would like to place them to be used by the update title block functions.

    Joe
    Please use plain text.
    Active Contributor
    Posts: 46
    Registered: ‎04-20-2005

    Re: DWGDESC Value

    05-22-2006 01:04 PM in reply to: joechrobak
    Pat when I open the WDP file with notepad
    I see the drawing filemname in the file but not the other information

    Joe
    Please use plain text.
    Active Contributor
    Posts: 46
    Registered: ‎04-20-2005

    Re: DWGDESC Value

    05-22-2006 01:11 PM in reply to: joechrobak
    Pat
    I guess what I am looking for
    Is there an API call that I can stuff values to these variables
    i.e. I have a routine that will read the value on the title block and I want to put that value into the DD1 DD2 DD3 values for the drawing.
    Please use plain text.
    *Pat Murnen \(Autodesk\)

    Re: DWGDESC Value

    05-23-2006 05:26 AM in reply to: joechrobak
    The drawing descriptions are held in the .wdp file. I've reproduced a small
    amount of the bottom end here with some comments. Before each drawing name
    are the optional descriptions. Three equal signs precede the text. I've
    added spaces here between them for clarity but there should be no spaces in
    the .wdp file. The order of the liens tell which description it is, DD1,
    DD2, or DD3.

    =sec1
    = =subsec1
    = = =Flow and Interconnection diagram, I/O list
    = = =Line 2 for drawing 1
    = = =Line 3 for drawing 1
    demo01.dwg
    = = =3-phase motor control, Control circuit
    = = =line 2 for drawing 2
    = = =line 3 for drawing 2
    demo02.dwg
    = = =Power supplies, I/O module feeds
    demo03.dwg
    = = =Control schematic
    demo04.dwg
    = = =PLC I/O - Inputs - Slot 1
    demo05.dwg
    = = =PLC I/O - Inputs - Slots 3, 4
    demo06.dwg
    = = =PLC I/O - Input Slot 5, Output Slot 6
    demo07.dwg
    = = =Operator Station layout
    demo08.dwg
    = = =Main Control Panel layout
    demo09.dwg

    I didn't see any API specifically for this but you could look at the Help
    under API section G - Project Management. It looks like some of these API's
    weren't updated to include the newer description lines 2 & 3 though. For
    example, wd_proj_wdp_write shows (list (list nil sec1 subsec1 dwg1 dwgdesc1
    ref)(list nil sec2 subsec2 dwg2 dwgdesc2 ref)...) which doesn't include
    support for the lines 2 & 3. I will log this.

    Pat Murnen

    wrote in message news:5182510@discussion.autodesk.com...
    Pat
    I guess what I am looking for
    Is there an API call that I can stuff values to these variables
    i.e. I have a routine that will read the value on the title block and I want
    to put that value into the DD1 DD2 DD3 values for the drawing.
    Please use plain text.
    Active Contributor
    Posts: 46
    Registered: ‎04-20-2005

    Re: DWGDESC Value

    05-23-2006 09:20 AM in reply to: joechrobak
    Pat
    I was able to write the values to the WDP file for the Section
    Sub-Section and DwgDescription
    This seems to work fine for me.
    What about theSheet # and Drawing under SHeet Values of Drawing proporties?
    Where is this info stored?
    Also, Can more User sheet values be added? i.e. Rev #and Rev Date etc..

    When reading and writing to the WDP file are there any specific precautions to be aware of?

    Thanks for your help

    Joe
    Please use plain text.
    *Pat Murnen \(Autodesk\)

    Re: DWGDESC Value

    05-23-2006 10:06 AM in reply to: joechrobak
    The Sheet and Drawing are saved on each drawing's WD_M block. This block
    should be on each AcadE drawing and has quite a few attributes. The Sheet
    value is stored on the SHEET attribute and the Drawing value is stored on
    the SHEETDWGNAME attribute. There are some general API calls that can modify
    an attribute value once you find the block.

    The Rev# and Rev Date (or user-defined) aren't stored by AcadE. They could
    be added as Drawing Custom Properties although depending on what you want to
    do with these this may or may not help. If they are stored on your title
    block, AcadE can update them with the Title Block function or report them
    from the Drawing List report.

    The .WDP file has a very specific format. It is not usually recommended to
    modify it directly. But if you do modifiy it directly this format must be
    maintained. Project description lines start with *[, default settings start
    with ?[, specific project settings start with +[. Drawing information should
    be at the end and is repeated for each drawing with the section line
    starting with one equal sign, the sub-section 2 equal signs, and the drawing
    descriptions 3 equal signs.

    Pat Murnen

    wrote in message news:5183406@discussion.autodesk.com...
    Pat
    I was able to write the values to the WDP file for the Section
    Sub-Section and DwgDescription
    This seems to work fine for me.
    What about theSheet # and Drawing under SHeet Values of Drawing proporties?
    Where is this info stored?
    Also, Can more User sheet values be added? i.e. Rev #and Rev Date etc..

    When reading and writing to the WDP file are there any specific precautions
    to be aware of?

    Thanks for your help

    Joe
    Please use plain text.
    Contributor
    Posts: 11
    Registered: ‎09-24-2012

    Re: DWGDESC Value

    10-01-2012 02:30 AM in reply to: joechrobak

    Can you tell me how to acces te .wdp file trough VBA? I have a VBA script that puts some information in the drawing, and now I want to put some information in the drawing properties description 1.

     

    Thank you.

    Please use plain text.
    Contributor
    Posts: 11
    Registered: ‎09-24-2012

    Re: DWGDESC Value

    10-01-2012 04:16 AM in reply to: 110000474593

    Never mind.

     

    I've managed to add the descriptions to the drawing properties. In the Autodesk API Reference, section G - Project Management, there is a 'ace_add_dwg_to_project' function. With this function you can set 'Drawing Descriptions'.

    Please use plain text.