Skip to content

GET_NOTEBOOK_POS_SIZE ​

GET_NOTEBOOK_POS_SIZE returns the position x, y and the size w, h of the notebook with the passed objid in pixel.

Syntax ​

leo-grammar
CC "Modeling" GET_NOTEBOOK_POS_SIZE objid:idValue  .


# --> RESULT ecode:intValue x:intValue y:intValue w:intValue h:intValue

Parameters ​

  • objid (idValue) -

Returns ​

  • ecode (intValue) - the return variable ecode is set to 0 if setting worked, to 1 if an error occured.
  • x (intValue) -
  • y (intValue) -
  • w (intValue) -
  • h (intValue) -

Details ​

See Also ​

Examples ​

asc
# get the current model
SEND "GET_ACTIVE_MODEL" to:"Modeling" answer:modelid
IF (modelid = "")
{
   CC "AdoScript" ERRORBOX "Open a model first!"
   EXIT
}

# get all objects
CC "Core" GET_ALL_OBJS modelid:(VAL modelid)
IF (ecode != 0)
{
   CC "AdoScript" ERRORBOX "Something went very wrong here (e.g. we passed the wrong model id)!\n"
   EXIT
}

SET myObjId:(VAL token(objids,1," "))

CC "Modeling" EXEC_NOTEBOOK objid:(myObjId)
CC "Modeling" debug GET_NOTEBOOK_POS_SIZE objid:(myObjId)
CC "Modeling" CLOSE_ALL_NOTEBOOKS modelid:(VAL modelid)

Shows the size of a notebook.

Versions and Changes ​

Available since ADOxx 1.3