Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: change text on CAD by excel sheet

  1. #11
    Join Date
    Login to Give a bone

    Default Re: change text on CAD by excel sheet

    We don't know the reasons because he would like to unload the procedure, however the procedure to unload it's correct.
    We suggested how to fix the first point he highlighted concerning the SelectionSet, declaring as general object instead AcadSelectionSet.

    If you have time try to download my solution and give me a feedback.
    What I understand is:
    He has inside the drawing several text related to a TAG, and would like to change based an excel list before created by himself or somebody.
    So I created a selection set containing all text found in the drawing (Text are placed in a specific LAYER, named TAG), and a loop for comparing and substituting when comparison matches the excel cell.
    Let me know your impression.

  2. #12
    Login to Give a bone

    Default Re: change text on CAD by excel sheet

    hi grobnik
    i really appreciate your support
    as i said before i am little knowledge of VBA
    so what i did
    1- i open autcad dwg.
    2- select what i need to change.
    3- open the excel file.
    4- load .bas file.
    5- run the VBA.
    and that is the error i face now.

  3. #13
    Join Date
    Login to Give a bone

    Default Re: change text on CAD by excel sheet

    this part of procedure it has been used to find the final row address of Excel file,
    procedure check from row 1 to row n inside excel file, until the cells contains an empty value checked by "", if found we can retrive the maximum row used in the excel file, and we can save time instead check the entire worksheet cells inside column A.
    Of course in order to do this, it is necessary to have excel opened, with current worksheet containing value to find and value for substitution.
    Please note that we are inside autocad workplace and we are pointing to excel by object WKRS object variable, defined as Global inside main procedure, if this it's not working properly we cannot have the access to Excel file.
    Let me know

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 0
    Last Post: 2019-12-24, 06:25 PM
  2. Change CAD layer through Excel VBA or LISP
    By bagusdewantoro86762677 in forum VBA/COM Interop
    Replies: 5
    Last Post: 2019-02-14, 10:41 PM
  3. Replies: 0
    Last Post: 2015-10-25, 10:06 AM
  4. Link Sheet set to Sheet List Table and Excel
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 1
    Last Post: 2013-05-19, 05:52 AM
  5. Linking Excel Sheet in IDW with an Excel Sheet in IPT
    By Darkstar24 in forum Inventor - General
    Replies: 4
    Last Post: 2008-04-20, 06:14 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