mgEvalInBackgroundModgen
mgEvalInBackgroundModgen(d_schCV o_schCon s_callback[g_updateSrcConstraint] ) =>l_userCallbackReturnVal/ nil
Description
Creates a Modgen scratch cellview for the specified schematic Modgen constraint, evaluates the specified user callback in the Modgen context, and then closes and deletes the scratch cellview.
Arguments
Value Returned
Example
Creates a Modgen scratch cellview for the specified schematic Modgen constraint, evaluates it, closes it, and deletes it.
procedure(getRows(mgId conId)
caddr(car(exists(x ciConListParams(conId) car(x) == "numRows")))
)
procedure(getCols(mgId conId)
caddr(car(exists(x ciConListParams(conId) car(x) == "numCols")))
)
procedure(setRowsGetColsUpdate(mgId conId)
ciConUpdateParams(conId list(list("numRows" 4))); this sets "numCols" to 4
caddr(car(exists(x ciConListParams(conId) car(x) == "numCols")))
)
procedure(setRowsGetColsNoUpdate(mgId conId)
; disable Modgen constraint observer while setting "numRows" to 4
mgExecNoConObs(conId
ciConUpdateParams(conId list(list("numRows" 4)))
caddr(car(exists(x ciConListParams(conId) car(x) == "numCols"))) ; "numCols" will not change because the observer was not running when "numRows" was set to 4
)
schCV = geGetEditCellView()
scache = ciCacheGet(schCV)
ciConCreate(scache 'modgen ?members list(list("PM1" 'inst) list("PM2" 'inst)))
schCon = car(scache->constraints)
mgEvalInBackgroundModgen(schCV schCon 'getRows nil)
> 1
mgEvalInBackgroundModgen(schCV schCon 'getCols nil)
> 8
mgEvalInBackgroundModgen(schCV schCon 'setRowsGetColsUpdate)
> 4
mgEvalInBackgroundModgen(schCV schCon 'setRowsGetColsNoUpdate)
> 4
Return to top