Results 1 to 3 of 3

Thread: Changing the order of attributes

  1. #1
    Active Member
    Join Date
    2002-05
    Posts
    72
    Login to Give a bone
    0

    Question Changing the order of attributes

    I have to set the order of some 75 attributes in 92 variation of a block. Therefore it would be much easier to write a routine to do this. So I can select each attribute by its tag name (.tagstring) however now I need a way to set its order, does it have an index number or some other property that I can set/manipulate to achieve this?

    Thanks,

    Kelly

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,420
    Login to Give a bone
    0

    Default Re: Changing the order of attributes

    I havn't tried to automate such a task, but the order that an attribute appears in the attribute editor has always been determined by the order in which it was added to the block, i.e. selection order during the BLOCK command. In vba, all the block's entities are stored in it's Items collection. They do have an assosiated index, but you can't simply reorder a collection by changing the index number (i.e. readonly). You would have to iterate through the collection and temporarily remove the AcadAttribute objects to another collection or array, sort them, and then add them back to the block in the new sort order. If you use a collection as the temp container, you can use the InsertBefore/After methods to order the temp collection. This may vary somewhat depending on the criteria you need for sorting.
    C:> ED WORKING....


    LinkedIn

  3. #3
    Active Member
    Join Date
    2002-05
    Posts
    72
    Login to Give a bone
    0

    Default Re: Changing the order of attributes

    Thanks for the ideas Ed, I had not considered what you propose. I assumed that because the BATTMAN command allows you to sort them that there must be some sort index number or other property. I will explore this deeper.

    Thanks,

    Kelly

Similar Threads

  1. 2011: How do i change the order of attributes after definition?
    By ZeroLengthLine in forum AutoCAD General
    Replies: 4
    Last Post: 2013-01-14, 10:20 PM
  2. Changing the editing order of attributes
    By cwjean76 in forum AutoCAD General
    Replies: 8
    Last Post: 2008-03-07, 06:31 PM
  3. Cannot change order of Attributes in Tblock!
    By Cosmic Traveller in forum AutoCAD General
    Replies: 3
    Last Post: 2006-12-11, 07:37 PM
  4. Order of Attributes in a Block
    By crohloff.72988 in forum AutoCAD General
    Replies: 15
    Last Post: 2006-11-02, 03:30 PM
  5. Order of attributes during defying block
    By Peter Sedlacek in forum AutoCAD General
    Replies: 1
    Last Post: 2004-09-16, 06:30 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
  •