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

enterPath

enterPath(
[ ?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 ]
[ ?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 ]
[ ?cursor x_cursor ]
) 
=> l_point_list / nil

Description

Enters a path in the current window.

Arguments

?prompts l_promptList

  

List of prompt strings to be displayed.

?points l_pointList

  

List of points to start the path. If specified, all points are adjusted. If the list terminates with two identical points, the adjusted points are returned with no further interaction. If not, the path is displayed using the given points, and a rubberbanding path segment is drawn from the last point to the current cursor position. Each successive point entered causes a new permanent segment between that point and the previous point. The function terminates when two identical points are entered, or when the function is explicitly terminated with finishEnterFun or cancelEnterFun.

?wantPoints x_pointLimit

  

Number specifying the maximum number of points to be used. If the x_pointLimit argument is supplied, the function returns the list of points after it reaches this number. In this case, the last two points do not need to be identical to terminate the function.

?form s_form

Options form created with hiCreateOptionsForm. This form is displayed when you call hiToggleEnterForm. It contains options relevant to the enterfunction and its caller.

?addPointProc t_addProcName

  

Name of the SKILL function to be called when a point is entered.

?delPointProc t_delProcName

  

Name of the SKILL function to be called when a point is deleted.

?initProc t_initProcName

  

Name of the SKILL function to be called immediately after the enterfunction is started and before any data entry.

?doneProc t_doneProcName

  

Name of the SKILL function to be called when the enterfunction is terminated.

?formProc t_formProcName

  

Name of the SKILL function to be called when the options form is displayed.

?pathStyle t_pathStyle

  

String defining the path style. It can take one of the following values:

T or Truncate: The path is square ended with no extension.

E or Extended: The path is square ended with an extension half of the width on each end.

R or Rounded: The path is round ended with no extension.

V or VariableEnd: The path is square ended with its extension specified by the f_beginExtent and f_endExtent arguments.

?pathWidth f_pathWidth

  

Width of the path in user units.

?beginExtent f_beginExtent

  

Distance from the first point that the path extends to.

?endExtent f_endExtent

  

Distance from the last point that the path extends to.

?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

  

Name you associate with the enterfunction. If the command name is set, it can be accessed with hiGetCurrentCmd.

?cursor x_cursor

An integer argument that will default to an appropriate cursor. For example, hicArrowRectangle for enterBox and hicArrowArc for enterArc. For more information on all available cursors see hiSetCursor.

Value Returned

l_point_list

The points you entered as a list containing the coordinates for a path.

nil

A nil list is returned.

Retrieve data through the callback procedure t_doneProcName instead of using the return value for this enterfunction.

Examples

Displays the prompt Enter the first point on the CIW prompt line. When you enter point p1 the prompt changes to Enter the next point. A rubber band path with width 6 appears between p1 and the current cursor location.

procedure( pathDone( w done pts )
if( done then
printf("Path entered was %L.\n" pts)
else
println("Path entry aborted.")
)
)
enterPath( ?prompts
list( "Enter the first point."
"Enter the next point." )
?doneProc "pathDone"
?wantPoints 4
?pathWidth 6. ?pathStyle "Truncate"
)

Enter point p2 and the first path segment becomes permanent, while the rubberbanding path segment now attaches the cursor to p2. The prompt remains the same because the second prompt in the list is used for any points after the first. Continue with p3 and p4. doneProc prints out the list of points:

Path entered was ( p1 p2 p3 p4 ).

The enterfunction returns the list of points:

( p1 p2 p3 p4 ) 

Related Topics

User Entry Functions

hiCreateOptionsForm

undrawEnterFun

hiGetCurrentCmd


Return to top
 ⠀
X