Guest
All,
The code below I am bringing up with the schematic and wish for it to
always be "tethered", linked or whatever to that schematic. Meaning
if I bring up another cell the code sometimes operates on the new
window and I will have to click on the original(or do some operation).
What is the code to capture the window or cell?
Thank you in advance,
Eric
procedure(EFCreateNetForm()
let((EFNetsBox EFTermsOrNet )
cv=geGetEditCellView()
EFNet_list=nil
when(cv
foreach( inst cv~>instances
EFInstance=inst~>name
EFCellname=inst~>master~>cellName
foreach( instTerm inst~>instTerms
Term=instTerm~>name
Net=instTerm~>net~>name
printf(EFInstance)
printf(".")
printf(EFCellname)
printf(".")
printf(Term)
printf(" - ")
printf(Net)
printf("\n")
EFNet_list=append(EFNet_list list(strcat( "|" EFInstance "."
EFCellname "." Term " - " Net )))
);foreach
);foreach
);when
t
);let
;sort the output
EFNet_list=sort(EFNet_list nil)
;=============================================
;section below defines form
;=============================================
EFDualMode = hiCreateRadioField(
?name 'EFDualMode
?prompt "Sort data by?"
?value "None"
?defValue "None"
?choices list("None" "Instance" "Cellname" "Pin" "Net")
?callback
list("case(EFInstanceNetsForm->EFDualMode->value
(\"None\"
EFInstanceNetsForm->EFSortBy->editable = nil
)
(\"Instance\"
EFInstanceNetsForm->EFSortBy->editable = t
)
(\"Cellname\"
EFInstanceNetsForm->EFSortBy->editable = t
)
(\"Pin\"
EFInstanceNetsForm->EFSortBy->editable = t
)
(\"Net\"
EFInstanceNetsForm->EFSortBy->editable = t
)
)");end case
)
EFSortBy = hiCreateStringField(
?name 'EFSortBy
?prompt "Instance, Net, Cellname or Pin"
?editable nil
?value ""
)
EFNetsBox = hiCreateListBoxField(
?name 'EFListBoxField
?prompt " "
?choices EFNet_list
?value nil
?multipleSelect nil
?numRows length(EFNet_list)
)
;;; defines the form
hiCreateAppForm(
?name 'EFInstanceNetsForm
?formTitle "Instance Viewer. Data Format:Instance.Cellname.Term
(Pin) - Net Name"
?callback "EFSortExecutionCB(hiGetCurrentForm())"
?fields
list(
EFDualMode
EFSortBy
EFNetsBox
)
?help ""
) ; hiCreateAppForm
hiDisplayForm(EFInstanceNetsForm)
);procedure
EFCreateNetForm()
;=================================================================
;After Form is up and All data is listed in list box, accept input
;for a sort. Create new forms for each. Use hiGetCurrentform on all.
;=================================================================
procedure(EFSortExecutionCB(form)
let((EFSortByans EFInstanceToSortBy EFCellnameToSortBy EFPinToSortBy
EFNetToSortBy)
EFSortByans=form->EFDualMode->value
if(EFSortByans=="None"
then EFSortByNoneForm()
);if
if(EFSortByans=="Instance"
then EFInstanceToSortBy=form->EFSortBy->value
EFSortByInstanceForm()
);if
if(EFSortByans=="Cellname"
then EFCellnameToSortBy=form->EFSortBy->value
EFSortByCellnameForm()
);if
if(EFSortByans=="Pin"
then EFPinToSortBy=form->EFSortBy->value
printf(EFPinToSortBy)
EFSortByPinForm()
);if
if(EFSortByans=="Net"
then EFNetToSortBy=form->EFSortBy->value
EFSortByNetForm()
);if
);let
);procedure EFSortExecution()
procedure(EFSortByInstanceForm()
let((EFNetsBox EFTermsOrNet EFInstanceVar)
cv=geGetEditCellView()
EFNet_list=nil
when(cv
foreach( inst cv~>instances
EFInstance=inst~>name
EFCellname=inst~>master~>cellName
foreach( instTerm inst~>instTerms
Term=instTerm~>name
Net=instTerm~>net~>name
if(EFInstanceToSortBy==nil
then EFNet_list=append(EFNet_list list(strcat( "|" EFInstance "."
EFCellname "." Term " - " Net )))
);if
if(EFInstanceToSortBy==EFInstance
then EFNet_list=append(EFNet_list list(strcat( "|" EFInstance "."
EFCellname "." Term " - " Net )))
);if
);foreach
);foreach
);when
t
);let
;sort the output
EFNet_list=sort(EFNet_list nil)
EFInstanceNetsForm->EFListBoxField->choices=EFNet_list
)
procedure(EFSortByCellnameForm()
let((EFNetsBox EFTermsOrNet EFInstanceVar)
cv=geGetEditCellView()
EFNet_list=nil
when(cv
foreach( inst cv~>instances
EFInstance=inst~>name
EFCellname=inst~>master~>cellName
foreach( instTerm inst~>instTerms
Term=instTerm~>name
Net=instTerm~>net~>name
if(EFCellnameToSortBy==nil
then EFNet_list=append(EFNet_list list(strcat( "|" EFInstance "."
EFCellname "." Term " - " Net )))
);if
if(EFCellnameToSortBy==EFCellname
then EFNet_list=append(EFNet_list list(strcat( "|" EFInstance "."
EFCellname "." Term " - " Net )))
);if
);foreach
);foreach
);when
t
);let
;sort the output
EFNet_list=sort(EFNet_list nil)
EFInstanceNetsForm->EFListBoxField->choices=EFNet_list
)
procedure(EFSortByPinForm()
let((EFNetsBox EFTermsOrNet EFInstanceVar)
cv=geGetEditCellView()
EFNet_list=nil
printf(EFPinToSortBy)
when(cv
foreach( inst cv~>instances
EFInstance=inst~>name
EFCellname=inst~>master~>cellName
foreach( instTerm inst~>instTerms
Term=instTerm~>name
Net=instTerm~>net~>name
if(EFPinToSortBy==Term
then EFNet_list=append(EFNet_list list(strcat( "|" EFInstance "."
EFCellname "." Term " - " Net )))
);if
);foreach
);foreach
);when
t
);let
;sort the output
EFNet_list=sort(EFNet_list nil)
EFInstanceNetsForm->EFListBoxField->choices=EFNet_list
)
procedure(EFSortByNetForm()
let((EFNetsBox EFTermsOrNet EFInstanceVar)
cv=geGetEditCellView()
EFNet_list=nil
when(cv
foreach( inst cv~>instances
EFInstance=inst~>name
EFCellname=inst~>master~>cellName
foreach( instTerm inst~>instTerms
Term=instTerm~>name
Net=instTerm~>net~>name
if(EFNetToSortBy==nil
then EFNet_list=append(EFNet_list list(strcat( "|" EFInstance "."
EFCellname "." Term " - " Net )))
);if
if(EFNetToSortBy==Net
then EFNet_list=append(EFNet_list list(strcat( "|" EFInstance "."
EFCellname "." Term " - " Net )))
);if
);foreach
);foreach
);when
t
);let
;sort the output
EFNet_list=sort(EFNet_list nil)
EFInstanceNetsForm->EFListBoxField->choices=EFNet_list
)
procedure(EFSortByNoneForm()
let((EFNetsBox EFTermsOrNet EFInstanceVar)
cv=geGetEditCellView()
EFNet_list=nil
when(cv
foreach( inst cv~>instances
EFInstance=inst~>name
EFCellname=inst~>master~>cellName
foreach( instTerm inst~>instTerms
Term=instTerm~>name
Net=instTerm~>net~>name
EFNet_list=append(EFNet_list list(strcat( "|" EFInstance "."
EFCellname "." Term " - " Net )))
);foreach
);foreach
);when
t
);let
;sort the output
EFNet_list=sort(EFNet_list nil)
EFInstanceNetsForm->EFListBoxField->choices=EFNet_list
)
;schSchFindForm->schFindPropValueString->value = "VREG1B"
;_hiFormApplyCB(schSchFindForm)
;schSchFindForm->schFindZoomButton->value = t
The code below I am bringing up with the schematic and wish for it to
always be "tethered", linked or whatever to that schematic. Meaning
if I bring up another cell the code sometimes operates on the new
window and I will have to click on the original(or do some operation).
What is the code to capture the window or cell?
Thank you in advance,
Eric
procedure(EFCreateNetForm()
let((EFNetsBox EFTermsOrNet )
cv=geGetEditCellView()
EFNet_list=nil
when(cv
foreach( inst cv~>instances
EFInstance=inst~>name
EFCellname=inst~>master~>cellName
foreach( instTerm inst~>instTerms
Term=instTerm~>name
Net=instTerm~>net~>name
printf(EFInstance)
printf(".")
printf(EFCellname)
printf(".")
printf(Term)
printf(" - ")
printf(Net)
printf("\n")
EFNet_list=append(EFNet_list list(strcat( "|" EFInstance "."
EFCellname "." Term " - " Net )))
);foreach
);foreach
);when
t
);let
;sort the output
EFNet_list=sort(EFNet_list nil)
;=============================================
;section below defines form
;=============================================
EFDualMode = hiCreateRadioField(
?name 'EFDualMode
?prompt "Sort data by?"
?value "None"
?defValue "None"
?choices list("None" "Instance" "Cellname" "Pin" "Net")
?callback
list("case(EFInstanceNetsForm->EFDualMode->value
(\"None\"
EFInstanceNetsForm->EFSortBy->editable = nil
)
(\"Instance\"
EFInstanceNetsForm->EFSortBy->editable = t
)
(\"Cellname\"
EFInstanceNetsForm->EFSortBy->editable = t
)
(\"Pin\"
EFInstanceNetsForm->EFSortBy->editable = t
)
(\"Net\"
EFInstanceNetsForm->EFSortBy->editable = t
)
)");end case
)
EFSortBy = hiCreateStringField(
?name 'EFSortBy
?prompt "Instance, Net, Cellname or Pin"
?editable nil
?value ""
)
EFNetsBox = hiCreateListBoxField(
?name 'EFListBoxField
?prompt " "
?choices EFNet_list
?value nil
?multipleSelect nil
?numRows length(EFNet_list)
)
;;; defines the form
hiCreateAppForm(
?name 'EFInstanceNetsForm
?formTitle "Instance Viewer. Data Format:Instance.Cellname.Term
(Pin) - Net Name"
?callback "EFSortExecutionCB(hiGetCurrentForm())"
?fields
list(
EFDualMode
EFSortBy
EFNetsBox
)
?help ""
) ; hiCreateAppForm
hiDisplayForm(EFInstanceNetsForm)
);procedure
EFCreateNetForm()
;=================================================================
;After Form is up and All data is listed in list box, accept input
;for a sort. Create new forms for each. Use hiGetCurrentform on all.
;=================================================================
procedure(EFSortExecutionCB(form)
let((EFSortByans EFInstanceToSortBy EFCellnameToSortBy EFPinToSortBy
EFNetToSortBy)
EFSortByans=form->EFDualMode->value
if(EFSortByans=="None"
then EFSortByNoneForm()
);if
if(EFSortByans=="Instance"
then EFInstanceToSortBy=form->EFSortBy->value
EFSortByInstanceForm()
);if
if(EFSortByans=="Cellname"
then EFCellnameToSortBy=form->EFSortBy->value
EFSortByCellnameForm()
);if
if(EFSortByans=="Pin"
then EFPinToSortBy=form->EFSortBy->value
printf(EFPinToSortBy)
EFSortByPinForm()
);if
if(EFSortByans=="Net"
then EFNetToSortBy=form->EFSortBy->value
EFSortByNetForm()
);if
);let
);procedure EFSortExecution()
procedure(EFSortByInstanceForm()
let((EFNetsBox EFTermsOrNet EFInstanceVar)
cv=geGetEditCellView()
EFNet_list=nil
when(cv
foreach( inst cv~>instances
EFInstance=inst~>name
EFCellname=inst~>master~>cellName
foreach( instTerm inst~>instTerms
Term=instTerm~>name
Net=instTerm~>net~>name
if(EFInstanceToSortBy==nil
then EFNet_list=append(EFNet_list list(strcat( "|" EFInstance "."
EFCellname "." Term " - " Net )))
);if
if(EFInstanceToSortBy==EFInstance
then EFNet_list=append(EFNet_list list(strcat( "|" EFInstance "."
EFCellname "." Term " - " Net )))
);if
);foreach
);foreach
);when
t
);let
;sort the output
EFNet_list=sort(EFNet_list nil)
EFInstanceNetsForm->EFListBoxField->choices=EFNet_list
)
procedure(EFSortByCellnameForm()
let((EFNetsBox EFTermsOrNet EFInstanceVar)
cv=geGetEditCellView()
EFNet_list=nil
when(cv
foreach( inst cv~>instances
EFInstance=inst~>name
EFCellname=inst~>master~>cellName
foreach( instTerm inst~>instTerms
Term=instTerm~>name
Net=instTerm~>net~>name
if(EFCellnameToSortBy==nil
then EFNet_list=append(EFNet_list list(strcat( "|" EFInstance "."
EFCellname "." Term " - " Net )))
);if
if(EFCellnameToSortBy==EFCellname
then EFNet_list=append(EFNet_list list(strcat( "|" EFInstance "."
EFCellname "." Term " - " Net )))
);if
);foreach
);foreach
);when
t
);let
;sort the output
EFNet_list=sort(EFNet_list nil)
EFInstanceNetsForm->EFListBoxField->choices=EFNet_list
)
procedure(EFSortByPinForm()
let((EFNetsBox EFTermsOrNet EFInstanceVar)
cv=geGetEditCellView()
EFNet_list=nil
printf(EFPinToSortBy)
when(cv
foreach( inst cv~>instances
EFInstance=inst~>name
EFCellname=inst~>master~>cellName
foreach( instTerm inst~>instTerms
Term=instTerm~>name
Net=instTerm~>net~>name
if(EFPinToSortBy==Term
then EFNet_list=append(EFNet_list list(strcat( "|" EFInstance "."
EFCellname "." Term " - " Net )))
);if
);foreach
);foreach
);when
t
);let
;sort the output
EFNet_list=sort(EFNet_list nil)
EFInstanceNetsForm->EFListBoxField->choices=EFNet_list
)
procedure(EFSortByNetForm()
let((EFNetsBox EFTermsOrNet EFInstanceVar)
cv=geGetEditCellView()
EFNet_list=nil
when(cv
foreach( inst cv~>instances
EFInstance=inst~>name
EFCellname=inst~>master~>cellName
foreach( instTerm inst~>instTerms
Term=instTerm~>name
Net=instTerm~>net~>name
if(EFNetToSortBy==nil
then EFNet_list=append(EFNet_list list(strcat( "|" EFInstance "."
EFCellname "." Term " - " Net )))
);if
if(EFNetToSortBy==Net
then EFNet_list=append(EFNet_list list(strcat( "|" EFInstance "."
EFCellname "." Term " - " Net )))
);if
);foreach
);foreach
);when
t
);let
;sort the output
EFNet_list=sort(EFNet_list nil)
EFInstanceNetsForm->EFListBoxField->choices=EFNet_list
)
procedure(EFSortByNoneForm()
let((EFNetsBox EFTermsOrNet EFInstanceVar)
cv=geGetEditCellView()
EFNet_list=nil
when(cv
foreach( inst cv~>instances
EFInstance=inst~>name
EFCellname=inst~>master~>cellName
foreach( instTerm inst~>instTerms
Term=instTerm~>name
Net=instTerm~>net~>name
EFNet_list=append(EFNet_list list(strcat( "|" EFInstance "."
EFCellname "." Term " - " Net )))
);foreach
);foreach
);when
t
);let
;sort the output
EFNet_list=sort(EFNet_list nil)
EFInstanceNetsForm->EFListBoxField->choices=EFNet_list
)
;schSchFindForm->schFindPropValueString->value = "VREG1B"
;_hiFormApplyCB(schSchFindForm)
;schSchFindForm->schFindZoomButton->value = t