anchor.diff:  ;;; Author: Wilfred Stapper
   ;;; Copyright  2015
   
  +(defun block-table|definition ( r a )
  +	(cond
  +		((= r 0) 
  +			(cond
  +				((= a "PTABLE") 
  +					(setq 
  +						aSymbol "SYMBOL*"
  +						aDefinition "!NUMBER,!LETTER,ID=LETTER|NUMBER,DESCRIPTION"
  +						aFilter (if aFilter (strcat "!NUMBER=" aFilter "*"))
  +						aSort "!NUMBER,!LETTER"
  +						aDuplicate "ID"
  +					)
  +				)
  +				((= a "BTABLE")
  +					(setq
  +						aSymbol "BALLOON"
  +						aDefinition nil
  +						aFilter nil
  +						aSort "ID"
  +						aDuplicate "ID"
  +					)
  +				)
  +				((= a "BLOCK-TABLE")
  +					(setq
  +						aSymbol (if aSymbol aSymbol "*")
  +						aDefinition nil
  +						aFilter nil
  +						aSort nil
  +						aDuplicate nil
  +					)
  +				)
  +			)
  +		)
  +	)
  +)
  +
   (defun block-table|regapp ( r )
   	(cond
   		((= r 0) "THOORUNA_BLOCK-TABLE_0")
  
positive.code: 	)
  )
  
  (defun c:ptable ( / aDefinition aDuplicate aFilter aSort aSymbol aTitle aWidth )
  	(cm:initialize)
  	
  	(initget "1 2 3 4 5 6 7 8 9 0 *" 129)
  
negative.code: 	(setq
  		aTitle (strcat "P & I D" (if aFilter (strcat " - Group " aFilter) ""))
  		aWidth nil
  		aFunction "PTABLE"
  	)
  	
  	(block-table|definition 0 aFunction)
  	(block-table nil 1 aTitle aWidth aFunction aSymbol aDefinition aFilter aSort aDuplicate)
  	
  	(cm:terminate)
  )
  
  (defun c:btable ( / aDefinition aDuplicate aFunction aFilter aSort aSymbol aTitle aWidth )
  	(cm:initialize)
  	
  	(setq
  		aTitle "PARTS LIST"
  		aWidth nil
  		aFunction "BTABLE"
  	)
  	
  	(block-table|definition 0 aFunction)
  	(block-table nil 1 aTitle aWidth aFunction aSymbol aDefinition aFilter aSort aDuplicate)
  	
  	(cm:terminate)
  )
  
  (defun c:block-table ( / aDefinition aDuplicate aFunction aFilter aSort aSymbol aTitle aWidth )
  	(cm:initialize)
  	
  	(setq
  		aTitle "BLOCK TABLE"
  		aWidth nil
  		aFunction "BLOCK-TABLE"
  	)
  	
  	(block-table|definition 0 aFunction)
  	(block-table nil 1 aTitle aWidth aFunction aSymbol aDefinition aFilter aSort aDuplicate)
  	
  	(cm:terminate)
  )
  
  (defun c:block-table-update ( / aDefinition aDuplicate aFunction aFilter aSort aSymbol aTitle aWidth e l rScaleFactor )
  	(cm:initialize)
  	
  	(foreach e (im:select-all-tables)
  		(cond 
  			((setq l (xm:get-data e (block-table|regapp 0) (block-table|xdata 0)))
  				(princ (if aTitle (strcat "\nUpdating table: " aTitle) "\nUpdating table..."))
  				
  				(block-table|definition 0 aFunction)
  				(block-table (em:primary-point e) rScaleFactor aTitle aWidth aFunction aSymbol aDefinition aFilter aSort aDuplicate)
  				(entdel e)
  			)
  			(T (princ "\nTable does not contain extended entity data."))
  