home *** CD-ROM | disk | FTP | other *** search
- %atrig.ccc
- * attach a group of attributes to entities
- :j
- * check geometric mode activity (c100=' ')
- ascii c100 r13
- if r13 eq 32 :a
- mess illegal command, use \GEOM first !
- getwe
- goto :j
- :a
- c1='0' ;* check attributes group status
- ovl attrgr
- if r2 eq -1 :X
- if r2 eq -9 :X
- goto :i
- :X
- mess no attributes group found, press <ENTER> to create it
- getw
- :A
- mess name=value of attribute to add (3-20 char.) (<ENTER> to escape)
- r93=0
- *getc+ c171 20
- r37=0
- r38=-20
- r39=171
- r1=0
- ovl getc
- if r1 ne 0 :A
- if r93 ne 0 :a
- ascii c171 r9
- if r9 eq 32 :A
- c1='a' ;* add
- ovl attrgr
- if r2 eq -2 :2
- if r2 eq -3 :3
- if r2 eq -4 :4
- if r2 eq -5 :5
- if r2 eq -6 :6
- if r2 eq -7 :7
- if r2 eq -8 :8
- repeat :a
- :i
- mess options: a-Add,d-Delete,u-Update,s-Show,<ENTER>-Attach group
- r93 = 0
- getc+ c2 1
- if r93 ne 0 :t ;* attach
- ascii c2 r9
- if r9 ge 97 :l
- * upper case-switch to low
- r9 = r9+32
- :l
- if r9 eq 97 :A ;* add
- if r9 eq 100 :D ;* delete
- if r9 eq 115 :S ;* show
- if r9 eq 117 :U ;* update
- repeat :a
- :S
- c1='1' ;* display all
- ovl attrgr
- if r2 ge 0 :o
- mess attributes group is empty !
- :o
- getw
- repeat :a
- :D
- mess name of attribute to delete (<ENTER> to escape)
- goto :m
- :U
- mess name/name=value of attribute to update (<ENTER> to escape)
- *goto :m
- :m
- r93=0
- *getc+ c171 20
- r37=0
- r38=-20
- r39=171
- r1=0
- ovl getc
- if r1 ne 0 :m
- if r93 ne 0 :a
- c1=c2 ;* selected option
- ovl attrgr
- if r2 ge 0 :c
- if r2 eq -1 :1
- if r2 eq -9 :9
- if r2 eq -2 :2
- if r2 eq -3 :3
- if r2 eq -4 :4
- if r2 eq -5 :5
- if r2 eq -6 :6
- :c
- if r2 ne 3 :b
- * r2=3, another entry for update
- :s
- mess new value of attribute to update
- *def c171 20
- *getc c171 20
- r37=1
- r38=20
- r39=171
- r1=0
- ovl getc
- if r1 ne 0 :s
- c1='u'
- ovl attrgr
- if r2 eq -2 :2
- if r2 eq -3 :3
- if r2 eq -4 :4
- goto :c
- :b
- repeat :a
- :t
- sbreset
- * attach attributes
- mess attach attributes to: y-selection group, n-single entity <n>
- r1=0
- def 'n'
- getyn r1
- if r1 eq 0 :u
- i1=0
- goto :v
- :u
- mess entity to attach the attributes to (<ENTER> to escape)
- r93 = 0
- gete+ i1
- if r93 ne 0 :a
- mess confirm choice
- getyn r1;unshow i1;if r1 eq 1 :w
- goto :u
- :w
- c1='T'
- ovl attrgr
- if r2 eq -1 :1
- if r2 eq -9 :9
- if r2 eq -7 :7
- sbreset
- repeat :u
- :v
- c1='T'
- ovl attrgr
- if r2 eq -1 :1
- if r2 eq -9 :9
- if r2 eq -7 :7
- repeat :a
- * ERRORS
- :1
- mess ERROR, no attributes found - only ADD is possible !
- getwe
- goto :a
- :9
- mess ERROR, no 'active' attributes found - only ADD/UPDATE possible !
- getwe
- goto :a
- :2
- mess ERROR, unable to create attributes file !
- getwe
- goto :z
- :3
- mess ERROR, attribute string should be: NAME=VALUE...!
- getwe
- goto :a
- :4
- mess ERROR, attribute not found !
- getwe
- goto :a
- :5
- mess ERROR, attribute to show not found !
- getwe
- goto :a
- :6
- mess ERROR, attribute to add already exists, use UPDATE option !
- getwe
- goto :a
- :7
- mess ERROR, too many attributes in group !
- getwe
- goto :a
- :8
- mess ERROR, first character of name should NOT be: '$' or '>' or '*'
- getwe
- goto :a
- :z
-