-- Created by Mansyur Usman (mansyur.usm@gmail.com)
-- Created dated 21 December 2013
-- This Macro is used to generate Bolt Report
-- This Macro can be generated in Isodrfat Module
Var !UserName Login
Var !UserName UpCase(|$!UserName|)
var !COLL COLLECT ALL PIPE FOR CE
var !EVAL EVALUATE (NAME) FOR ALL FROM !COLL
do !I VALUES !EVAL
ADD $!I
BOLTREPORT $!I
handle ANY
$P $!!error.text
endhandle
enddo
!DATTIM = OBJECT DATETIME()
!DAY = !DATTIM.DATE().STRING()
IF !DAY.LENGTH().EQ( 1 ) THEN
!DAY = '0' + !DAY
ENDIF
!MON = !DATTIM.MONTH().STRING()
IF !MON.LENGTH().EQ( 1 ) THEN
!MON = '0' + !MON
ENDIF
!MONSTR = !DATTIM.MONTHSTRING()
!YORN = !!ALERT.CONFIRM( 'Pak $!UserName Pilih Yes untuk Excel File dan Pilih No untuk Txt File' )
IF !YORN.EQ( 'YES' ) THEN
BOLTFILE $!MSR
ELSE
BOLTFILE $!MSR1
ENDIF
!!ALERT.MESSAGE('Pak $!UserName Report Bolt dari Project $!PCOD kami simpan di C:\PDMSUSER\SMK3\REPORTS\')
MESS /C:\TEMP\mess over
MaterialList Code 29 DUMMY SUFFIX SINGLE
MaterialList TableDefinition Column 1 DESCRIPTION with Width 120
Column 2 BORE with Width 6
Column 3 ITEMCODE WITH WIDTH 12
Column 4 QUANTITY with Width 9
Itemcode from SPREF
MaterialList Code 8
Itemcode Length SHORT
Delimiter COLON
Bolting length description ON
Bolting Units METIMP
why dont you try exporting bolt report from isodraft. it gives accurate result. you just need to write vba programm to read those text files, compile it and sum total values.
why dont you try exporting bolt report from isodraft. it gives accurate result. you just need to write vba programm to read those text files, compile it and sum total values.