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

Thread: Edit attribute progamatically

  1. #11
    Forum Manager, Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    4,776

    Default Re: Edit attribute progamatically

    Funtions that accept arguments for filter data require that you pass it in the form of a variant array, i.e. you need to dim a variant and then assign the array to the variant. For some code, check out help example for that select method.

    Also, if you are using a wildcard for all names, then that's the same logic as not filtering names at all. You can leave that part off.
    C:> ED WORKING....

  2. #12
    AUGI Addict MikeJarosz's Avatar
    Join Date
    2003-09
    Location
    New York NY
    Posts
    1,005

    Default Re: Edit attribute progamatically

    Also, make sure you understand option base. To most people, starting a count at zero is unnatural, but unless you decare otherwise, that is the VBA default.
    "everything you know is wrong...." -FST

  3. #13
    Forum Manager, Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    4,776

    Default Re: Edit attribute progamatically

    Its not that. If you declare a sub with an argument with a variable that is an array, you won't be able to use the argument. You will get a "Can't assign to array error." when you try to set the arg at runtime. Since an array consists of multiple sub elements, you can't just simply say 'this array equals that array'. The only way to assign values to an "existing array" is to specify the index at which to store a value. VBA needs to know what values to put at what index. Therefore, you create a sub that has a variant as an arg. VBA can create then create an new array dynamically at assign time. The only trick is that the sub with such an argument must know how to deal with it or you will get other errors.
    C:> ED WORKING....

  4. #14
    I could stop if I wanted to artisteroi's Avatar
    Join Date
    2007-02
    Location
    Tampa, FL
    Posts
    269

    Default Re: Edit attribute progamatically

    Quote Originally Posted by Ed Jobe
    Its not that. If you declare a sub with an argument with a variable that is an array, you won't be able to use the argument. You will get a "Can't assign to array error." when you try to set the arg at runtime. Since an array consists of multiple sub elements, you can't just simply say 'this array equals that array'. The only way to assign values to an "existing array" is to specify the index at which to store a value. VBA needs to know what values to put at what index. Therefore, you create a sub that has a variant as an arg. VBA can create then create an new array dynamically at assign time. The only trick is that the sub with such an argument must know how to deal with it or you will get other errors.
    ummm, ok.

    I'm starting to think this might be beyond my comprehension. maybe I need to hire someone else to do code and just go back to the engineering part. Anyone need a job?

  5. #15
    Forum Manager, Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    4,776

    Default Re: Edit attribute progamatically

    Variables are areas of memory set aside for specific uses. Each type of variable has its own size and structure. So you can only put things in them designed to fit the structure and size restrictions. An array is like a storage cabinet with multiple shelves (storage locations). In order to put something in the cabinet, you have to be specific and tell the loader what shelf to put it on. If you have another cabinet you can't just simply say 'put whatever is in this cabinet in the other cabinet'. You have to be more specific and say 'put what's on shelf 1 in cab A on shelf 1 in cab B' since the shelves in cab B will hold them in any order. But if you have a large empty shed (variant), you can say 'put cab A in the shed'.
    C:> ED WORKING....

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Attribute Edit
    By rken.laws in forum AutoLISP
    Replies: 7
    Last Post: 2009-07-07, 01:38 PM
  2. Block w/Attribute will not edit
    By rcox898534 in forum AutoCAD General
    Replies: 10
    Last Post: 2007-12-06, 07:50 PM
  3. Replies: 35
    Last Post: 2007-06-05, 10:05 PM
  4. Edit attribute command?
    By Kroke in forum AutoCAD General
    Replies: 3
    Last Post: 2005-03-26, 08:24 AM
  5. Edit Attribute Box---Is there another way
    By jamesvue1981 in forum AutoCAD General
    Replies: 18
    Last Post: 2004-12-13, 09:29 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
  •