I think there was a question about scheduling blocks with attributes.
It took a little longer and there is a lot of list manipulation to develop a composite list of attribute tagstrings...
So before we talk about tables and their structure I created this routine to make a schedule that includes attribute values.
Long attribute values or tagstrings can cause wordwrap issues...
So enter the block wildcard string, the tag string wildcard string and you get a printout to the textscr that schedules blocks and attribute values.
So check it out and tell me if it works for you...
Code:
;___________________________________________________________________________________________________________|
;
; Written By: Peter Jamtgaard C.E., P.E., S.E. copyright 2018 All Rights Reserved
;___________________________________________________________________________________________________________|
;
; Any use by unauthorized person or business is strictly prohibited.
;___________________________________________________________________________________________________________|
;
; Abstract: This set of functions are created to demonstrate how to make block schedules with attributes
;___________________________________________________________________________________________________________|
;
; Command Line Function Header List
;___________________________________________________________________________________________________________|
;* C:BAS
;* Command Line Function to output a list quantity of and block names to the text screen (in modelspace)
;* C:BlockSchedule
;* Command Line Function to output a list quantity of and block names to the text screen (in modelspace)
;___________________________________________________________________________________________________________|
;
; General Function Header List
;___________________________________________________________________________________________________________|
; Function, Arguments and Description
;* (BlockAttributeSchedule strWCBlockName strWCTagString)
;* Function to create a list of sublists of block counts from a wildcard string filter for blockname and tagstring
;* (BlockAttributeTagstringBlend lstOfSublists lstTagStrings)
;* Function to create a list of sublists tagstrings for all blocks in table
;* (BlockAttributeTagStringList lstOfSublists)
;* Function to create a full list of all tagstrings in the output
;* (BlockDefinition objBlockReference)
;* Function to get the block definition of a block reference
;* (BlockFormatLine lstOfStrings)
;* Function to format a line of the report from a list of strings
;* (BlockHandleScheduleRecursive (objBlockDefinition)
;* Function to iterate through a block definition counting blocks (recursive) returns a list of handles
;* (BlockHandleToSublist strHandle)
;* Function to develop a list of sublists including blockname and tagstrings with values from a block.
;* (ErrorTrap symFunction)
;* Function to trap errors. Returns value or T for success and nil for failure
;* (ListOfSublistsColumnsSort lstOfSublists)
;* Function to sort the columns of the tagstring values in the output
;* (ListofSublistsSortbyItem lstOfSublists intItem)
;* Function to sort a list of sublists in ascending order by a specific item in list (0 indexed)
;* (SublistCompress lstStrings)
;* Function to compress a list of sublists to include count, block name and attribute values
;* (TextFormat strString intWidth strRightorLeft)
;* Function to set text length (to intWidth characters) and justify text "R" or "L"
;* (ToObject value)
;* Function to convert a vla-object, entitynames, entsels, elists, handles or objectid's to a vla-object.
;$ Header End
See attachment for code.