Results 1 to 2 of 2

Thread: Updating Drawing Properties thru VBA

  1. #1
    I could stop if I wanted to
    Join Date
    2015-09
    Posts
    420
    Login to Give a bone
    0

    Default Updating Drawing Properties thru VBA

    Hello to All At AUGI:

    I am new to Visual Basic so forgive me if this is a dumb question however, is it possible to fill in or update drawing property field values automatically via a VBA routine..???

    For example can the "user name", "file name", "date" and "drawing title" etc. be captured and stored and/or updated in the drawing properties fields every time the drawing is saved.??

    If so can you provide some examples so I can get started in developing a routine to accomplish this task or does one exist already..?

    Any assistance would be appreciated.

  2. #2
    I could stop if I wanted to
    Join Date
    2002-02
    Location
    Kansas
    Posts
    487
    Login to Give a bone
    0

    Default Re: Updating Drawing Properties thru VBA

    You can try this

    :note this is 2002 code my not work in 2004 or 2005

    Code:
     
    Dim XR As AcadXRecord
    Set XR = ThisDrawing.Dictionaries.Item("DWGPROPS") 
     
    '-------NOTE WILL EORRO IN here if
    '--------------DRAWING has on  DWGPROPS IN IT
     
    XR.GetXRecordData XTYPE, XDATA 'THIS GET THE DWGPROPS
    '----XDATA(1) IS TITLE
    '----XDATA(2) IS SUBJECT
    '----XDATA(3) IS AUTHOR
    '---XDATA(4) IS COMENTS
    '---XDATA(5) IS KEYWORDS
    '---XDATA(6) IS LAST SAVE BY
    '---XDATA(7) ????
    '---XDATA(8) IS NAME1=VAULE1
    '---THUR
    '---XDATA(17) IS NAME10=VAULE10"
    '---XDATA(19) thru DATA(21) ??????
    '---XDATA(22) = NUMBER OF CUSTOM VAULE USED
    '--YOU PUT CODE HERE TO CHANGE THE VAULE
    '--
     
    '--THEN
    XR.SetXRecordData XTYPE, XDATA 'THIS WILL UPDATE THE DWGPROPS
    Last edited by jwanstaett; 2004-11-15 at 07:26 PM.

Similar Threads

  1. Need help updating Multi Leader properties
    By clark682496 in forum AutoLISP
    Replies: 0
    Last Post: 2014-10-30, 11:52 PM
  2. Table for updating dynamic block properties
    By parkerfeldman in forum AutoLISP
    Replies: 0
    Last Post: 2009-02-03, 07:34 PM
  3. SSM Custom Properties not updating Fields
    By shannonhayes13 in forum CAD Management - General
    Replies: 4
    Last Post: 2008-11-15, 02:33 AM
  4. Updating Page Setups From One Drawing to Another
    By roundbox52 in forum VBA/COM Interop
    Replies: 1
    Last Post: 2008-10-30, 08:36 PM
  5. Replies: 8
    Last Post: 2006-12-12, 12:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •