I am trying to get a list of attributes from blocks in a drawing. That's easy enough but then I want to sort that list alpha-numerally and per the format of another set list. For example, I have a list of attributes:("DESCA01" "DESCA02" "DESCA03" "DESCA04" "DESCB01" "DESCB02" "DESCB03" "DESCB04" "DESCC01" "DESCC02" "DESCC03" "DESCC04" "DESCD01" "DESCD02" "DESCD03" "DESCD04" "DESCE01" "DESCE02" "DESCE03" "DESCE04"). I want it to look like: ("DESCA01" "DESCB01" "DESCC01" "DESCD01" "DESCE01" "DESCA02" "DESCB02" "DESCC02" "DESCD02" "DESCE02" "DESCA03" "DESCB03" "DESCC03" "DESCD03" "DESCE03" "DESCA04" "DESCB04" "DESCC04" "DESCD04" "DESCE04").
I am having a problem finding anything that will sort a list in the order of my "format" list. Here is my "format" list:("TAG,TAG1*,TAG2," "ID" "WDTAGALT" "DESC" "DESC1" "DESC2" "DESC3" "DESC4" "DESC5" "LOC" "MFG" "MFG*" "CAT" "CAT??" "CATD*" "LINE*" "ADDR-TAG-DESC01" "TAGA01" "IODESC01" "DESC[A-E]01" "ADDR-TAG-DESC02" "TAGA02" "IODESC02" "DESC[A-E]02" "ADDR-TAG-DESC03" "TAGA03" "IODESC03" "DESC[A-E]03" "ADDR-TAG-DESC04" "TAGA04" "IODESC04" "DESC[A-E]04" "ADDR-TAG-DESC05").
I just want to sort my original list to be like my format. if there are other attributes in the original list that are not in my format list, they are added at the end in alpha-numeric order.
Thanks for any assistance with this.