• @ me_hungry ..  smart trick..:) .... but i guess this wont work with no of specs around 138...which is case of mine. writefile() will stop executing when the no. of writing line exceeds 10000.
    BTW.   thank you very much
    @Shri  I have no knowledge of VBA..:(  will be acuiring it soon.!
  • Ops.. I forgot it :)
    ok, but we may use two files. One for the replacement and one for append)

    -- By me_hungry


    !currentitem = !!ce
    -- values inside not processed file
    !readarray   = object ARRAY()
    -- replacement file dir
    !fileelement = object FILE('d:\ReplacementSpecs.txt')
    !fileelement.DeleteFile()
    -- Output file dir
    !uofileelement = object FILE('d:\OutputSpecsFile.txt')
    !uofileelement.DeleteFile()


    var !spearr coll all spec with(matchwild(name,'*LIMBOSPEC*') ne true) for ce
    speconmode
    -- formate
    do !specs values !spearr
    $!specs
    -- create file
    file /$!fileelement overwrite output ce file end
    -- replace /* in file
    !readarray = !fileelement.readFile()
    -- values inside new file
    !valinnewfile   = object ARRAY()
    do !readval values !readarray
     !readval = !readval.replace('*/',!specs.dbref().name + '/')
     !valinnewfile.append(!readval)
    enddo
    !uofileelement.writeFile('APPEND', !valinnewfile)
    enddo
    exit
    $!currentitem
    !fileelement.DeleteFile()


  • It takes more time than I expected(to output file). I have 200 specs and its about 5 min to perform macross.
  • the macro below is just for quick viewing specs
    not in specon mode
    change value in single quotes in first line to the path of the folder you want to use as folder for specs output
    then go to SPWL level and run macro
    it will collect all SPECS within SPWL and output it
    check folder then


    !outputFolder = '[COLOR=#FF0000]C:\temp\specs\[/COLOR]'

    !outputFolderOF = OBJECT FILE(!outputFolder)
    if (!outputFolderOF.Exists().Not()) then
     !!Alert.Message('Please first create folder
     $!outputFolder')
      RETURN
    endif
    if (!!CE.Type NEQ 'SPWL') then
     !!Alert.Message('Works only on SPWL level')
      RETURN
    endif

    !getCE = !!CE.Name
    VAR !specs COLLECT ALL SPEC WITH ( NOT ( MATCHW(NAME,'*LIMBO*') ) ) FOR CE
    do !x from 1 to !specs.Size()
    !outputArray = OBJECT ARRAY()
     !outputFileName = !outputFolder + !specs[!x].Dbref().Name.Replace('/','_') + '.csv'
     !outputFileNameOF = object file(!outputFileName)
     !outputArray.Append('Specification: ' + !specs[!x].Dbref().Name)
     var !GtypSele COLLECT ALL SPEC MEM WITH (TYPE EQ 'SELE') for $!specs[$!x]
       do !y from 1 to !GtypSele.Size()
          !outputArray.Append(!GtypSele[!y].Dbref().Tans)
          !GtypSeleDepth = !GtypSele[!y].Dbref().Dbdept
         
       VAR !spcos COLLECT ALL SPCO FOR $!GtypSele[$!y]
       
       !outputArray.Append('Spco Name;Catref;Detail;Matxt;Cmpref')
       
       do !z from 1 to !spcos.Size()
         
       !outputString = ''
      !getCatref = !spcos[!z].Dbref().Catref.Name
        HANDLE ANY
          !getCatref = 'No valid Catref or unset'
        ENDHANDLE
       
      !getDetail = !spcos[!z].Dbref().Detref.Name
        HANDLE ANY
          !getDetail = 'No valid Detref or unset'
        ENDHANDLE
       
      !getMatref = !spcos[!z].Dbref().Matxt.Name
        HANDLE ANY
          !getMatref = 'No valid Matref or unset'
        ENDHANDLE
       
      !getCmpref = !spcos[!z].Dbref().Cmpref.Name
        HANDLE ANY
          !getCmpref = 'No valid Cmpref or unset'
        ENDHANDLE
       
      !spcoDepth = !spcos[!z].Dbref().Dbdepth
      !GetDepthUntilGtyp = !spcoDepth - !GtypSeleDepth - 1
      !outputString = !outputString + !spcos[!z].Dbref().Name + ';' + !getCatref + ';' + !getDetail + ';' + !getMatref + ';' + !getCmpref
         !outputArray.Append(!outputString)
       !outputString = ''
      !spcoOwnerQuestion = !spcos[!z].Dbref().Owner.Tquest
      !spcoAnswer = !spcos[!z].Dbref().Tanswer
      !spcoMaxAnswer = ''
        if (!spcoOwnerQuestion EQ '') then
          !spcoOwnerQuestion = !spcos[!z].Dbref().Owner.Quest
        endif
        if (!spcoAnswer EQ '') then
                   !spcoAnswer = !spcos[!z].Dbref().Answer.String()
       !spcoMaxAnswer = '(MaxAns=' + !spcos[!z].Dbref().MaxAnswer.String() + ')'
        endif    
       
       if (!spcoOwnerQuestion EQ 'PBOR') then
         !spcoOwnerQuestion = !spcoOwnerQuestion + !spcos[!z].Dbref().Owner.Qual.String()
       endif
       
           !outputString = !outputString + !spcoOwnerQuestion + '=' + !spcoAnswer + !spcoMaxAnswer
        $!spcos[$!z]
      do !a from 1 to !getDepthUntilGtyp
        OWNER
       
      !seleOwnerQuestion = !!CE.Owner.Tquest
      !seleAnswer = !!CE.Tanswer
      !seleMaxAnswer = ''  
        if (!seleOwnerQuestion EQ '') then
          !seleOwnerQuestion = !!CE.Owner.Quest
        endif
        if (!seleAnswer EQ '') then
                   !seleAnswer = !!CE.Answer.String()
       !seleMaxAnswer = '(MaxAns=' + !!CE.MaxAnswer.String() + ')'
        endif
       
       if (!seleOwnerQuestion EQ 'PBOR') then
         !seleOwnerQuestion = !seleOwnerQuestion + !!CE.Owner.Qual.String()
       endif
       
      !outputString = !outputString + '<--' + !seleOwnerQuestion + '=' + !seleAnswer + !seleMaxAnswer
      enddo  
         !outputArray.Append(!outputString)
            !outputArray.Append('')
       enddo
       
       !outputArray.Append('')
     
       enddo
       !outputArray.Append('')

    !outputFileNameOF.WriteFile('OVERWRITE',!outputArray)
    enddo

    $!getCE

    or simply use reports as it was said before
    for the Specon mode viewing it is much better to use me_hungry's macro with simple replacing
  • @ me hungry.. grt man!  tht did the job quite fast. That also taught me some more pml. you are a champ..:)
    Thanks a lot.
  • hello HARISH and ME-HUNGRY, My QUESTION IS HOW CAN I USE THE  ME -HUNGRY MACRO .

    PROMPT RESPONSE WILL BE HIGHLY APPRECIATED
    REGARDS
  • Hi soloweber[COLOR=#3E3E3E] !
    My macros used to output all specs that inside CE spwl(specification world) in [/SIZE][/COLOR][SIZE=3][COLOR=#008000]Specon mode viewing. [/COLOR][COLOR=#008000][/COLOR]So U just need to enter to paragon and navigated to needed SPWL and run macros(save my code to some [COLOR=#008000].txt file[/COLOR](d:\test.txt) and ru command [COLOR=#0000ff]$m /[/COLOR][COLOR=#0000ff]d:\test.txt[/COLOR][SIZE=3])

    Macros will create file [/SIZE][COLOR=#008000]D:\OutputSpecsFile.txt[/COLOR][SIZE=3]
    Hope that it`s clear..[/SIZE]