EDA365电子工程师网

标题: 请问如何获得当前Design有多少个TextBlock? [打印本页]

作者: yneda    时间: 2014-1-13 15:09
标题: 请问如何获得当前Design有多少个TextBlock?
请问下各位!
我想在设计新加一个TextBlock,比如最后一个TextBlock=50#,那我新加一个就是TextBlock=51#,问题是要如何知道最后一个TextBlock=50?新加一个我可以用笨办法宏来实现?求指点,谢谢!
作者: penny_828    时间: 2014-1-13 17:41
不清楚,有高手吗
作者: kevin890505    时间: 2014-1-13 22:37
axlGetParam("paramTextGroup")->groupMembers
作者: yneda    时间: 2014-1-14 10:01
kevin890505 发表于 2014-1-13 22:37
axlGetParam("paramTextGroup")->groupMembers

非常感谢kevin890505,又学到一招,谢谢!
作者: yneda    时间: 2014-1-15 11:42
kevin890505 发表于 2014-1-13 22:37
axlGetParam("paramTextGroup")->groupMembers

追问下,如何新加一个TextBlock呢?我现在是通过宏来实现,代码太长了,有时候还会报错,正排查,想简化下,谢谢!

FORM textblock compact
FORM textblock add
作者: 蓝风紫心    时间: 2014-1-15 12:54
不清楚,有高手吗
作者: kevin890505    时间: 2014-1-15 21:31
yneda 发表于 2014-1-15 11:42
追问下,如何新加一个TextBlock呢?我现在是通过宏来实现,代码太长了,有时候还会报错,正排查,想简化 ...

axlDBTextBlockCreate
作者: yneda    时间: 2014-1-16 10:01
kevin890505 发表于 2014-1-15 21:31
axlDBTextBlockCreate

在16.3的help里既然没查到这个函数的介绍,只找到了

axlDBTextBlockCompact(t/nil)=>x_unusedBlocks
t   : Compact the text blocks.
nil : Report the number of text blocks that can be eliminated from the database.


如果谁有这个函数的介绍,麻烦在这里贴一下,非常感谢!

作者: kevin890505    时间: 2014-1-16 14:35
yneda 发表于 2014-1-16 10:01
在16.3的help里既然没查到这个函数的介绍,只找到了

axlDBTextBlockCompact(t/nil)=>x_unusedBlocks

没有,应该不支持,不过你可以试试。介绍如下:
axlDBTextBlockCreate
axlDBTextBlockCreate(
x_blockTemplate
?width f_width
?height f_height
?lineSpace f_lineSpace
?charSpace f_charSpace
?photoWidth f_photoWidth
) => x_textBlock/nil
Description
Creates a new text block block from the template block number provided. By providing
optional textblock charactistics, you can get available text blocks by:
lst = axlGetParam("paramTextBlock")
Arguments
x_blockTemplate
f_XXX values
Value Returned
■ x_textBlock – new text block
■ nil – Returned if the command fails. Typically, this happens when you have exhausted
the number block Allegro provides, or one of the parameters is not of the correct data
type.
See Also
axlGetParam, axlSetParam, axlDBTextBlockCompact
Examples
Create a new text block based upon text block 1 but change width and height
blockNum = axlDBTextBlockCreate(1 ?width 15.0 ?height 16.0)




欢迎光临 EDA365电子工程师网 (http://bbs.elecnest.cn/) Powered by Discuz! X3.2