Programmable column for FrameMaker file version

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

Post Reply
User avatar
kdaube
Member
Member
Posts: 24
Joined: 2014 Jun 05, 16:42

Programmable column for FrameMaker file version

Post by kdaube »

Hello fans, this is really a great feature and was the reason to upgrade to the ultimate version.
However, I have trouble to set up the correct formula for the following purpose.
- FrameMaker files start at byte 0 witk these bytes (plain ascii):

Code: Select all

<MakerFile xx.x>
, for example <MakerFile 14.0> or <MakerFile 8.0H>
- I want to list the numeric part with a preceding v: v14 or v8.
- The following formulae do not work correctly

Code: Select all

                                       <MakerFile 14.0> ....  15.0>
With this forumula              i get ... 
if(${Extension}=fm,"v"+str(FBYTES(11,2))," ")     v31.34      v31.35
if(${Extension}=fm,"v"+str(INT(FBYTES(11,2))," ") v12596      v12597
How to get the correct display?
User avatar
nikos
Site Admin
Site Admin
Posts: 15800
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: Programmable column for FrameMaker file version

Post by nikos »

what you really need is an instruction FBYTES_text to extract the text plain and simple. Now we'd have to jump hoops and loops to do the conversion, especially because you don't know whether the number is single or double digit. If you only wanted numbers in range 10-19, you can just do

Code: Select all

if(${Extension}=fm, "v"+str(INT(FBYTES(11,2)) - 12582)," ")
ps. I will modify STR() instruction to convert these FBYTES strings into normal strings
User avatar
kdaube
Member
Member
Posts: 24
Joined: 2014 Jun 05, 16:42

Re: Programmable column for FrameMaker file version

Post by kdaube »

Thank You Nikos, for this explanation.
I will use this intermediate solution - until an FBYTES_text function will be available :wink:

Klaus
Post Reply