Product Documentation
Cadence User Interface SKILL Reference
Product Version IC23.1, September 2023

changeEnterFun

changeEnterFun(
s_enterFun 
[ ?prompts l_promptList ] 
[ ?points l_pointList ] 
[ ?wantPoints x_pointLimit ]
[ ?form s_form ] 
[ ?addPointProc t_addProcName ] 
[ ?delPointProc t_delProcName ] 
[ ?initProc t_initProcName ] 
[ ?doneProc t_doneProcName ]
[ ?formProc t_formProcName ]
[ ?pathStyle t_pathStyle ]
[ ?cursor x_cursor ]
[ ?pathWidth f_pathWidth ]
[ ?beginExtent f_beginExtent ]
[ ?endExtent f_endExtent ] 
[ ?dontDraw g_dontDraw ]
[ ?alwaysMap g_alwaysMap ]
[ ?acceptString g_acceptString ]
[ ?acceptNumber g_acceptNumber ]
[ ?noInfix g_noInfix ]
[ ?cmdName t_cmdName ]
[ ?target l_point ]
) 
=> t / nil 

Description

Changes the current enterfunction to another one.

Since this function uses the current window to determine which enterfunction to change, make sure to properly set the current window before using this function. See hiSetCurrentWindow for information about setting the current window.

You can use changeEnterFun to get immediate response to any changes the user makes to the values on the option forms.

s_enterFun is the symbol of the enterfunction you want to change. For example, if you want to change to an enterBox, you specify the argument as ’enterBox.

changeEnterFun should always be provided with a ?doneProc argument.

changeEnterFun cancels the current enterfunction and then changes it to the new one. The call to the original enterfunction remains blocked until the changed enterfunction exits. When the new enterfunction is completed, it calls doneProc. Do not use changeEnterFun without specifying a doneProc because it will not return from the original enterfunction until the changed enterfunction returns or is canceled.

changeEnterFun allows a union of all the enterfunction arguments, although it uses only the arguments that apply to the enterfunction specified by s_enterFun.

Arguments

s_enterFun

Symbol for the enterfunction you wish to change to.

?prompts l_promptList

  

List of prompt strings used by the new enterfunction.

?points l_pointList

  

List of points that can be preloaded for the new enterfunction to operate on.

?wantPoints x_pointLimit

  

Number of points needed by the new enterfunction.

?form s_form

Form supplied to the new enterfunction.

?addPointProc t_addProcName

  

addPointProc corresponding to the new enterfunction.

?delPointProc t_delProcName

  

delPointProc corresponding to the new enterfunction.

?initProc t_initProcName

  

initProc corresponding to the new enterfunction.

?doneProc t_doneProcName

  

doneProc corresponding to the new enterfunction.

?formProc t_formProcName

  

formProc corresponding to the new enterfunction.

?pathStyle t_pathStyle

  

PathStyle to use if the new enterfunction is enterPath.

?cursor x_cursor

Cursor that is used when the enterfunction is active. For more information on all available cursors see hiSetCursor.

?pathWidth f_pathWidth

  

Path width to use if the new enterfunction is enterPath.

?beginExtent f_beginExtent

  

Beginning extension to use if the new enterfunction is enterPath.

?endExtent f_endExtent

  

Ending extension to use if the new enterfunction is enterPath.

?dontDraw g_dontDraw

  

Determines whether or not to draw rubber band lines.

?alwaysMap g_alwaysMap

  

Determines whether or not to immediately display the options form.

?acceptString g_acceptString

  

Determines whether or not to accept string input without terminating the enterfunction.

?acceptNumber g_acceptNumber

  

Determines whether or not to accept numeric input without terminating the enterfunction.

?noInfix g_noInfix

  

Determines whether or not to disable infix mode.

?cmdName t_cmdName

  

The name of the new enterfunction. You can use this name as an identifier to control nesting.

?target l_point

The target point to which a flight line is drawn from the current cursor.

This argument is valid only for the enterLine function.

Values Returned

t

The original enterfunction was successfully terminated and the new enterfunction was successfully initialized.

nil

The enterfunction was not successfully terminated or the new enterfunction was not initialized.

Examples

circleForm is a form containing options for drawing a circle. Here, because the alwaysMap flag is t, the form is displayed. The prompt in the CIW reads Center. Enter point p1. The prompt reads Radius, and a rubberbanding circle with center at p1 follows the cursor.

procedure( circleDone( w done pts )
if( done then
printf("Circle = %L\n" pts )
else
println("Circle entry aborted.")
)
)
procedure( ellipseDone( w done pts )
if( done then
printf("Ellipse = %L\n" pts )
else
println("Ellipse entry aborted.")
)
)
enterCircle( ?prompts list( "Center" "Radius")
?doneProc "circleDone" ?form circleForm ?alwaysMap t)

The message Circle entry aborted is printed, and the circle options form and the rubberbanding circle disappear as explained above. The prompt in the CIW is changed to First corner, and the ellipseForm appears. Enter p2, and a rubberbanding ellipse is drawn.

changeEnterFun( 'enterEllipse
 ?prompts list( "First Corner" "Second Corner")
 ?doneProc "ellipseDone" ?form ellipseForm ?alwaysMap t)

Related Topics

User Entry Functions


Return to top
 ⠀
X