When G-Post processes the NCL file it converts all lines that start with $$ into REMARK commands. So the $$ -> CUTTER / 10.00000, etc. gets changed to REMARK-> CUTTER / 10.00000. You can capture the REMARK statements in the FIL file and identify the CUTTER data, then extract the cutter diameter. It will be text so if you need it as a real number (scalar) you can convert it. Here is some sample FIL code you can add to your existing FIL file that will do this:
CIMFIL/ON,REMARK
REMTXT=TEXT/CLW $$ GET THE REMARK TEXT STRING
REMTXT=TEXT/OMIT,REMTXT,1 $$ REMOVE THE TRAILING BLANK SPACES
CUTF=INDXF(REMTXT,(TEXT/’CUTTER / ‘)) $$ LOOK FOR THE “CUTTER / ” STRING
IF(CUTF .GT. 0)THEN
NCH=CANF(REMTXT,1) $$ GET THE NUMBER OF CHARACTERS LEFT IN THE STRING
CDTXT=TEXT/RANGE,REMTXT,14,NCH $$ PARSE OUT THE CUTTER DIAMETER VALUE
CD=SCALF(CDTXT) $$ CONVERT THE TEXT INTO A SCALAR
ENDIF
CIMFIL/OFF
Fred Nemecek
The post How to output CUTTER command to the CL-file appeared first on Statii News.
source http://news.statii.co.uk/how-to-output-cutter-command-to-the-cl-file/
No comments:
Post a Comment