Ankündigung

Einklappen
Keine Ankündigung bisher.

Export attributes to excel

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Export attributes to excel

    I'm new with PML so this could sound easy to someone.

    I'm making form that collects equipments (or other) and exports those with attributes to excel.

    How this can be done?

  • #2
    Hi,

    the easiest way ist to use the Search Utility form from Aveva. If you want to export an array you can have a look on this thread



    mitn "M" geht's manchmal leichter, aber Winkelbemaßung geht a net

    Kommentar


    • #3
      Zitat von Slepe Beitrag anzeigen
      I'm new with PML so this could sound easy to someone.

      I'm making form that collects equipments (or other) and exports those with attributes to excel.

      How this can be done?
      may be something like this ?

      Code:
      !Outa = Array()
      !Outb = Array()
      !Outc = Array()
      !Resc = !!collectallfor('Rest',|Mcount Gt 0|,!!ce)
      Do !X values !Resc
      !ResNa = !X.Name
      !Outa.append(!ResNa)
      Enddo
      !Outa.SortUnique()
      
      Do !U indices !Outa
      !Resm = !!collectallfor('PCLA SCLA HELE','',$!Outa[$!U] )
      Do !O Values !Resm
      !Raw[01] = !O.own.own.own.namn
      !Raw[02] = !O.own.href.namn
      Handle Any
      $P $!O
      Endhandle
      !Raw[03] = !O.own.own.namn
      !Raw[04] = !O.own.href.own.own.namn
      !Raw[05] = !O.own.href.own.namn
      !Raw[06] = !O.own.href.Dtxr
      !Raw[07] = !O.Dtxr
      If !Raw[06].Matchwild('*HANGER*')then
      !Raw[08] = !O.Catref.Param[1].Real()
      Else
      !Raw[08] = !O.own.Href.Catref.Param[1].Real()
      Endif
      !Outd = !O.Catref.Param
      Do !T indices !Outd
      !Wei = !Outd[!T]
      Enddo
      
      !Raw[09] = !Wei
      ---Hydra
      Handle (2,751)
      !Raw[09] = 0
      Endhandle
      !Raw[10] = 0
      If !Raw[07].Matchwild('*HANGER ROD*')then
      !Raw[10] = !O.Height.Int()
      Elseif !Raw[06].Matchwild('*FOOT*')then
      !Refe = !O.Own.Ref
      !Fram = !O.Own.own.stlref
      !Sctn = !!collectallfor('SCTN','',$!Fram )
      Do !Y Values !Sctn
      !Dsce = !Y.Description
      If '$!Dsce' Eq '$!Refe' then
      !Raw[10] = !Y.Cutlength.int()
      Else
      Endif
      Enddo
      Endif
      !Raw[11] = !O.Mtxx
      ---Hydra
      Handle (2,232)
      !Raw[11] = |Nulref|
      Endhandle
      !Raw[12] = !O.Own.Href.Lstu.Mtxx
      !Raw[13] = !O.own.href.own.own.own.namn
      !Raw[14] = !O.own.href.own.own.:Dtemp
      !Outb.append(!Raw)
      Enddo
      Enddo
      
      !LiName = 'Primay Support MTO'
      Import 'Gridcontrol'
      Handle(1000,0)
      Endhandle
      !Outc[01] = 'Support Zone'
      !Outc[02] = 'Atta Name'
      !Outc[03] = 'Restraint Name'
      !Outc[04] = 'Pipe Name'
      !Outc[05] = 'Branch Name'
      !Outc[06] = 'Function'
      !Outc[07] = 'Description'
      !Outc[08] = 'Size'
      !Outc[09] = 'Unit Weight'
      !Outc[10] = 'Height'
      !Outc[11] = 'Material (Clamp)'
      !Outc[12] = 'Material (Pipe) '
      !Outc[13] = 'Pipe Zone'
      !Outc[14] = 'Design Temperature'
      
      
      Using NameSpace 'Aveva.PDMS.Presentation'
      !Grid = Object NetGridcontrol()
      !Grid.BindToDataSource(Object NetDataSource(!LiName, !Outc, !Outb))
      !NameSa = 'Primay Support MTO.xls'
      !Grid.SaveGridToExcel(!NameSa)
      Zuletzt geändert von webmaster; 10.05.2017, 21:05.

      Kommentar

      Lädt...
      X