EDA365电子工程师网

标题: 請教超出form size及大量的checklist應如何製作 [打印本页]

作者: ginooolu    时间: 2015-3-13 16:35
标题: 請教超出form size及大量的checklist應如何製作
本帖最后由 ginooolu 于 2015-3-13 16:48 编辑

請問各位先進及版主,要做成像allegro右側層面顯示的checklist,有scroll bar可以下拉解決checklist數量超過form size時問題,應使用甚麼含式或程式架構?
另外如Checklist可以用陣列或迴圈完成選擇嗎?例如Case checklist[0]執行printf(str[0]), checklist[1]執行printf(str[1])?


作者: XYX365    时间: 2015-3-13 16:46
本帖最后由 XYX365 于 2015-3-13 16:59 编辑


是不是類似下圖
[attach]94131[/attach]


LIST
A list box is a control that displays multiple items. If the list box is not large enough to display
all the list box items at once, the list box provides the required horizontal or vertical scroll bar.
We support two list box types; single (default) and multi-selection. You define a multi-select
box in form file with a "OPTIONS multiselect" List boxes have a width and height specified by
the the second and third options to the LIST keyword. The first option to the LIST keyword is
ignored and should always be an empty string ("").
List box options are:
SORT - alphabetical sort.


ALPHANUMSORT - takes in account trailing numbers so a NET2 appears before a
NET10 in the list.
PRETTYPRINT - case is ignored and items are reformatted for readability.
Special APIs for list controls are: axlFormListOptions, axlFormListDeleteAll,
axlFormListSelect, axlFormListGetItem, axlFormListAddItem,
axlFormListDeleteItem, axlFormListGetSelCount, axlFormListGetSelItems,
axlFormListSelAll.
For best performance in loading large lists consider passing a list of items to
axlFormSetField.



作者: ginooolu    时间: 2015-3-13 18:57
XYX365 您好,
是希望完全像我夾的貼圖,滾動Checkbox,
因為希望能方便的複選。
構想是將檢查項目存成list,然後可以針對要檢查的項目打勾hilighlight

作者: XYX365    时间: 2015-3-14 07:25
ginooolu 发表于 2015-3-13 18:57
XYX365 您好,
是希望完全像我夾的貼圖,滾動Checkbox,
因為希望能方便的複選。

List 裡面好像不能使用checkbox,只能使用字串,
你可以改用grid的方式試試看.

作者: ginooolu    时间: 2015-3-15 20:57
請問可以對grid做更多的說明嗎?
程式效果是希望如下圖
另外目前的寫法是用Case,然後問題是Case的目標不能是變數,這是限制嗎?
那是否有其他的思路可以簡化程式達到效果

作者: XYX365    时间: 2015-3-16 07:57
ginooolu 发表于 2015-3-15 20:57
請問可以對grid做更多的說明嗎?
程式效果是希望如下圖
另外目前的寫法是用Case,然後問題是Case的目標不 ...

請問可以對grid做更多的說明嗎?
=> Allegro 有一個範例 fgrid.il,可以參考
[attach]94216[/attach]

[attach]94217[/attach]



程式效果是希望如下圖
另外目前的寫法是用Case,然後問題是Case的目標不能是變數,這是限制嗎?
那是否有其他的思路可以簡化程式達到效果

=>請教一下 每一個net名稱都可以勾選並高亮或不高亮嗎?
還有這些net名稱,在不同的board也會不一樣,這樣你就不能使用case.
可以試試看cond 的迴圈加上rexMatchp判斷方式
不是變數的話,可以試試 loadstring


下面的判斷,我都是這樣寫,不用再去執行一次副程式axlFormGetField
if(axlFormGetField(PWRHIForm "HiCheck0") then
=> if(PWRHIForm->curValue then






再確認一下此工具的功能是不是要高亮或不高亮net嗎?

作者: ginooolu    时间: 2015-3-16 18:36
本帖最后由 ginooolu 于 2015-3-16 19:09 编辑

謝謝,您提供的方式我會再研究研究,不知為何載入fgrid時出現下面訊息:
E- *Error* _axlFormGridInsertCol: argument #1 should be any user-defined (other) type (type template = "otg") - nil
E- *Error* load: error while loading file - "fgrid.il"

每一個net名稱都可以勾選並高亮或不高亮嗎
是的,在程式開始時會要求輸入list,透過list產生checklist
Checklist的名稱是固定的(HiCheckn),只是label(netname)不同,原本使用Case是可以用的。只是case的字串似乎不能用變數,必須每個case都寫出來。您的寫法確實可以將checklist變成變數,也試驗出來了。謝謝

作者: XYX365    时间: 2015-3-17 10:17
ginooolu 发表于 2015-3-16 18:36
謝謝,您提供的方式我會再研究研究,不知為何載入fgrid時出現下面訊息:
E- *Error* _axlFormGridInsertCo ...

謝謝,您提供的方式我會再研究研究,不知為何載入fgrid時出現下面訊息:
E- *Error* _axlFormGridInsertCol: argument #1 should be any user-defined (other) type (type template = "otg") - nil
E- *Error* load: error while loading file - "fgrid.il"

=>必須將fgrid.il和fgrid.form 放在skill目錄下, 你是拿哪一個Allegro版本裡面的fgrid.il檔案

作者: ginooolu    时间: 2015-3-17 22:31
本帖最后由 ginooolu 于 2015-3-17 22:39 编辑

謝謝,原本form 跟.il放在PCBENV下會有問題,16.3/16.5都會。
後來把from拷貝到board file目錄就可以了。
grid功能似乎很複雜,要好好看一看了。
謝謝
作者: XYX365    时间: 2015-3-19 11:02
不是變數的話,也可以試試 evalstring
作者: ayi306    时间: 2018-3-30 23:25
提示: 作者被禁止或删除 内容自动屏蔽
作者: ayi306    时间: 2018-3-30 23:31
提示: 作者被禁止或删除 内容自动屏蔽
作者: ayi306    时间: 2018-3-31 12:48
提示: 作者被禁止或删除 内容自动屏蔽




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