Is there any macro availble to outpur spec

 
  • Hi friends,

    Is there any marco available for outputting all specs of a SPWL, into different notepads for every spec with its name.

    Venkat
  • You can try something similar to this:


    var !SPEC collect all (SPEC) for ce
    !folder = 'C:\PDMS\'
    do !x from 1 to !SPEC.size()
       $!SPEC[$!x]
       !outputSpec = '/' + !folder + !x.string() + '.txt'
       $P $!outputSpec
       file $!outputSpec
       output ce
       term    
    enddo
  • [QUOTE=pvaladares;91505]You can try something similar to this:


    var !SPEC collect all (SPEC) for ce
    !folder = 'C:\PDMS\'
    do !x from 1 to !SPEC.size()
       $!SPEC[$!x]
       !outputSpec = '/' + !folder + !x.string() + '.txt'
       $P $!outputSpec
       file $!outputSpec
       output ce
       term    
    enddo


    Thank u very much for quick reply.

    Actually I want output as specon output which is different from dblisting.
  • OK. Try the new version :)


    -- Output all spec for a SPWL
    -- Specon format
    var !SPEC collect all (SPEC) for ce
    var !names eval name for all from !SPEC


    !folder = 'C:\PDMS\'
    $P == Starting
    speconmode
       do !x from 1 to !SPEC.size()
           $!SPEC[$!x]
           !names[$!x] = !names[$!x].replace('/','')
           !names[$!x] = !names[$!x].replace('*','')
           !outputSpec = '/' + !folder + !names[$!x] + '.txt'
           $P $!outputSpec
           file $!outputSpec overwrite
           output ce
           term    
       enddo
    exit
    $P == End
  • [QUOTE=pvaladares;91516]OK. Try the new version :)


    -- Output all spec for a SPWL
    -- Specon format
    var !SPEC collect all (SPEC) for ce
    var !names eval name for all from !SPEC


    !folder = 'C:\PDMS\'
    $P == Starting
    speconmode
       do !x from 1 to !SPEC.size()
           $!SPEC[$!x]
           !names[$!x] = !names[$!x].replace('/','')
           !names[$!x] = !names[$!x].replace('*','')
           !outputSpec = '/' + !folder + !names[$!x] + '.txt'
           $P $!outputSpec
           file $!outputSpec overwrite
           output ce
           term    
       enddo
    exit
    $P == End


    Its working :)  

    Thank u very much