Hi, Below is a code snippet (not my own) that loops through all expressions in a 4D Write Pro document It seems that when an expression is the very first element in the document it is not detected Does anybody know a solution? Is there a better way to get all expressions?
Thanks, Piotr $done:=False $start:=ST Start text $end:=ST End text While (Not($done)) $type:=ST Get content type($object_ptr->;$start;$end;$startBlock;$endBlock) Case of : ($type=ST Expression type) $expression:=ST Get expression($object_ptr->;$startBlock;$endBlock) End case $start:=$endBlock $end:=$endBlock+1 If ($startBlock>=$endBlock) $done:=True End if End while ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************