查看: 152|回复: 0
收起左侧

[AVEVA MARINE] PML语言学习之批量替换型材规格

[复制链接]
发表于 2024-3-8 06:49 | 显示全部楼层 |阅读模式 来自: 中国
VAR !EQUIS COLL ALL EQUI WITH( MAT(DBNAME,'ELEC') GT 0 AND ( NAME OF TMPR EQ '/220-LB(1)-TYPE-TMPL' OR NAME OF TMPR EQ '/220-LB-TYPE-TMPL' OR NAME OF TMPR EQ '/220-LC-TYPE-TMPL' OR NAME OF TMPR EQ '/220-LC(1)-TYPE-TMPL') ) for ce

Q VAR !EQUIS

DO !E VALUES !EQUIS
  $!E
  TMPLATE 1
  UNLOCK ALL
  
  SCTN 8
  !flnm8 = flnm of spref of sctn 8
  if mat(!flnm8,'LDK') gt 0 then
          $p sctn 8 |is ok|
  else
          !flnm8 = !flnm8.replace('/GB/BEAM/L', '/ELEC/BEAM/LDK')
          q var !flnm8
          handle any
          endhandle
          spref $!flnm8
          $p |sctn 8 is changed|
  endif
  
  SCTN 9
  !flnm9 = flnm of spref of sctn 9
  if mat(!flnm9,'LDK') gt 0 then
          $p sctn 9 |is ok|
  else
          !flnm9 = !flnm9.replace('/GB/BEAM/L', '/ELEC/BEAM/LDK')
          q var !flnm9
          handle any
          endhandle
          spref $!flnm9
          $p |sctn 9 is changed|
  endif

  SCTN 10
  !flnm10 = flnm of spref of sctn 10
  if mat(!flnm10,'LDK') gt 0 then
          $p sctn 10 |is ok|
  else
          !flnm10 = !flnm10.replace('/GB/BEAM/L', '/ELEC/BEAM/LDK')
          q var !flnm10
          handle any
          endhandle
          spref $!flnm10
          $p |sctn 10 is changed|
  endif
  
  SCTN 11
  !flnm11 = flnm of spref of sctn 11
  if mat(!flnm11,'LDK') gt 0 then
          $p sctn 11 |is ok|
  else
          !flnm11 = !flnm11.replace('/GB/BEAM/L', '/ELEC/BEAM/LDK')
          q var !flnm11
          handle any
          endhandle
          spref $!flnm11
          $p |sctn 11 is changed|
  endif

ENDDO
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|标签|免责声明|龙船社区

GMT+8, 2024-4-30 00:33

Powered by Imarine

Copyright © 2006, 龙船社区

快速回复 返回顶部 返回列表