发表于:2009/8/11 23:46:07
#0楼
来源 极易ifix论坛
http://www.geifix.com/dispbbs.asp?boardid=5&replyid=67&id=56&skin=1
本例子,提供了下列按钮的编程脚本。
这段脚本重找了所有的标签组变量,并产生了一个字符串来代替标签组变量的名称。
这段脚本假设含有指令按钮的画面已经预先用retrievedefinition的方法从标签组对象中得到标签组。
例:制作标签组数据
private sub commandbutton1_click()
dim vasymbols as variant
dim vasubstitutions as variant
dim vadescriptions as variant
dim ssubstitutions() as string
dim sdescriptions() as string
dim picpath as string
this will contain the number of symbols in a picture
dim size as integer
dim counter as integer
dim filename as string
set the filename
filename = test
delete tag group file if it exists. kill permanently
deletes the specified file form the hard drive. use with
caution.
picpath = system.picturepath
if dir(picpath + filename + .tgd then
kill picpath + filename + .tgd
end if
get the symbols from the picture
me.retrievetaggroupvariables size, vasymbols
if size = 0 then
exit sub
end if
redim ssubstitutions(size - 1) as string
redim sdescriptions(size - 1) as string
fill in the symbols and the descriptions
for counter = 0 to size - 1
temp$ = fix32.thisnode. + vasymbols(count2) + .f_cv
ssubstitutions(counter) = temp$
sdescriptions(counter) = generated tag
next counter
create the tag group file object
dim tgf as object
vasubstitutions = ssubstitutions
vadescriptions = sdescriptions
set tgf = _
createobject(taggroupdefinitioninterfacedll_
.taggroupdefinitioninterface)
tgf.updatedefinition filename, size, vasymbols, _
vasubstitutions, vadescriptions
[URL=http://blog.csdn.net/cnauto/archive/2009/08/11/4436606.aspx][/URL]
----------------------------------------------
此篇文章从博客转发
原文地址: Http://blog.gkong.com/more.asp?id=96959&Name=springal
http://www.geifix.com/dispbbs.asp?boardid=5&replyid=67&id=56&skin=1
本例子,提供了下列按钮的编程脚本。
这段脚本重找了所有的标签组变量,并产生了一个字符串来代替标签组变量的名称。
这段脚本假设含有指令按钮的画面已经预先用retrievedefinition的方法从标签组对象中得到标签组。
例:制作标签组数据
private sub commandbutton1_click()
dim vasymbols as variant
dim vasubstitutions as variant
dim vadescriptions as variant
dim ssubstitutions() as string
dim sdescriptions() as string
dim picpath as string
this will contain the number of symbols in a picture
dim size as integer
dim counter as integer
dim filename as string
set the filename
filename = test
delete tag group file if it exists. kill permanently
deletes the specified file form the hard drive. use with
caution.
picpath = system.picturepath
if dir(picpath + filename + .tgd then
kill picpath + filename + .tgd
end if
get the symbols from the picture
me.retrievetaggroupvariables size, vasymbols
if size = 0 then
exit sub
end if
redim ssubstitutions(size - 1) as string
redim sdescriptions(size - 1) as string
fill in the symbols and the descriptions
for counter = 0 to size - 1
temp$ = fix32.thisnode. + vasymbols(count2) + .f_cv
ssubstitutions(counter) = temp$
sdescriptions(counter) = generated tag
next counter
create the tag group file object
dim tgf as object
vasubstitutions = ssubstitutions
vadescriptions = sdescriptions
set tgf = _
createobject(taggroupdefinitioninterfacedll_
.taggroupdefinitioninterface)
tgf.updatedefinition filename, size, vasymbols, _
vasubstitutions, vadescriptions
[URL=http://blog.csdn.net/cnauto/archive/2009/08/11/4436606.aspx][/URL]
----------------------------------------------
此篇文章从博客转发
原文地址: Http://blog.gkong.com/more.asp?id=96959&Name=springal