iCAx开思网

标题: 批量删除层名源代码示例 [打印本页]

作者: -KASA-    时间: 2009-3-6 19:34
标题: 批量删除层名源代码示例
代码如下:

  1. STRING/CATIG(80)
  2. INEXTN/12
  3. L10:
  4.        CATIG=NEXTN/IFEND,END:
  5.        CATD/CATIG
  6.        JUMP/L10:
  7. END:
  8. HALT
复制代码

本帖最后由 -KASA- 于 2009-3-25 20:01 编辑
作者: -KASA-    时间: 2009-3-6 19:42
1# -KASA-

刚试了下,有点小问题,这是完善后的代码:

  1. STRING/CATIG(80)
  2. INEXTN/12
  3. L10:
  4.        CATIG=NEXTN/IFEND,END:
  5.        IF/CATIG=='ALL',JUMP/L10:
  6.        CATD/CATIG
  7.        JUMP/L10:
  8. END:
  9.         MESSG/'删除完毕!'
  10. HALT
复制代码
源文件如下:
[attach]889759[/attach]
作者: -KASA-    时间: 2009-3-6 19:46
本帖最后由 -KASA- 于 2009-3-6 19:48 编辑

占位
作者: jiayuliao    时间: 2009-3-7 18:48
怎么样才能实现从层至层的删除
作者: ugman    时间: 2009-3-10 07:47
好,谢谢,十分。
作者: jiayuliao    时间: 2009-3-10 19:55
catv是怎么用的
作者: -KASA-    时间: 2009-3-11 09:15
6# jiayuliao

这里是doc中的原文:希望对你有帮助。
Query Category
Synopsis
CATV/'name'[,LAYER,layers,CNT,count][,DESCR,'description'][,IFERR,label:]

Description
Allows you to query the layers and the description in a category.

Parameters
Parameter
Description

'name'
The name of the existing category to query.

LAYER
Minor word which indicates that you want to verify the layers.

layers
The layers in the category are returned in this numeric array. This array should be large enough to hold the layers in the category.

CNT
Minor word which indicates the following number variable is the return area for the number of layers in the category.

count
Numerical return value which holds the actual count of layers in the category.

DESCR
Minor word indicates that you want to verify the description.

'description'
A return area for the description string which can consist of up to 80 characters.

IFERR,label:
Specifies a label to which program execution jumps if an error occurs
作者: jiayuliao    时间: 2009-3-11 20:14
number/n
CATV/'name',200,200,CNT,n,IFERR,trm:
print/n
trm:
   halt
这样错在哪里?
作者: -KASA-    时间: 2009-3-12 09:14
你还未完全理解doc中的代码格式,像下面的:
CATV/'name'[,LAYER,layers,CNT,count][,DESCR,'description'][,IFERR,label:]
变成你自己的代码应该是这样:
NUMBER / ly(256)
CATV/'name',LAYER,ly,CNT,n,IFERR,end:
作者: jiayuliao    时间: 2009-3-12 20:32
怎么样才能实现从层至层的删除层名,
比如,我要删除5至15层的层名,中间可能第10层没有命名的
请楼主指点
作者: jiayuliao    时间: 2009-3-23 19:19
怎么循环检测呢
作者: jiayuliao    时间: 2009-3-24 20:53
用什么命令检测呢
作者: jiayuliao    时间: 2009-3-25 18:24
10# jiayuliao 用什么命令检测呢
作者: -KASA-    时间: 2009-3-25 20:07
11# jiayuliao
下面所述有一个前提条件,那就是每层一个名字。
既然可以通过catv命令得出该层名对应的层,那么如果要实现你的功能,可以分下面几步:
1.循环所有层名,转第二步。
2.如果该层名对应的层在你事先给定的范围内,转第三步。
3.删除该层名。
作者: jiayuliao    时间: 2009-3-26 19:20
CATV/'name',LAYER,ly,CNT,n,IFERR,end:

ly是对应的层吗
作者: -KASA-    时间: 2009-3-30 09:17
ly是该层名对应的层,如果层名和层一对一的话,取ly(1)即可。
作者: jiayuliao    时间: 2009-3-30 19:15
明白了,楼主真是好人,谢谢了
作者: sumojinli    时间: 2009-4-2 17:58
ddddddddddddd
作者: CUI821228    时间: 2009-5-4 20:54
高人真多啊
作者: boxi2279    时间: 2009-5-5 19:26
好,谢谢,十分。
作者: wolf2117    时间: 2010-4-22 09:25
正为这事烦恼呢,下来试试看,先谢一个
作者: aslow    时间: 2011-1-6 20:55
遇到有中文名字的图层名。。删除时会出错!!!
作者: -KASA-    时间: 2011-11-23 15:25
是的,不支持中文层名。




欢迎光临 iCAx开思网 (https://www.icax.org/) Powered by Discuz! X3.3