AVEVA.PDMS.PML. Import Attributes from excel for CE

Update attributes for a particular element (seleceted in explorer) from a huge number of elements in excel. If you need to update all elements from the list check this.

You need only change Excel path that highlighted red in the code and navigate in design

explorer to your element, then run macro

Example .xls:

Dropbox

Pmlmac Content:

–Open Forms\Hide
show !!spreadsheetimport
hide !!spreadsheetimport
!!spreadsheetImport.setDataHandler( object EQUILOADER() )
!!spreadSheetImport.filename.val = ‘c:\PipeImport.xls’         $* Excel PATH
!!spreadSheetImport.loadData()
–Find first column names
!arrayNames = !!spreadSheetImport.dataGrid.getrows().EVALUATE(OBJECT BLOCK(‘!!spreadSheetImport.dataGrid.getrows()[!EVALINDEX][1]’))
!stringSelected = !arrayNames.find(!!ce.namn)
–If it eq to CE then process it
if( !stringSelected.size() ne 0 )then
–Process
!!spreadsheetImport.dataHandler[1].processData(!stringSelected[1])
endif

Video Manual:

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s