Skip to main content
16-Pearl
November 23, 2020
Solved

Decimal Sheet Scale

  • November 23, 2020
  • 1 reply
  • 2163 views
I am trying to find a numerical value for the sheet scale.

'docu::docu_inq_curr_sheet_scale_text) returns a text value. I actually would like a decimal value.

Is this possible?

Thank you

Tom
Best answer by ptc-4154876

The interface you used below is really a low-level interface that is really not meant for end users.  The correct/supported way to do this is to use the IKIT interface.  You can query the current sheet using the function (sd-am-inq-curr-sheet) which returns a sel_item.  Then with this sel_item, you can query the sheet structure using (sd-am-inq-sheet (sd-am-inq-curr-sheet)).  This returns a structure with info about the specified sheet along with the sheet scale.  You can get this by using (sd-am-sheet-struct-scale (sd-am-inq-sheet (sd-am-inq-curr-sheet))).  This will return a float number (as a string). to convert this to a number use (sd-read-from-string str).  This will convert a string to whatever data format the string represents.  In this case a floating point number.

 

This assume the lisp file has an (in-package :oli) statement.  If not, prepend each of these function calls with a oli prefix (oli:sd-read-from-string (oli:sd-am-sheet-struct-scale (oli:sd-am-inq-sheet (oli:sd-am-inq-curr-sheet))))

 

steveg

1 reply

5-Regular Member
November 24, 2020

The interface you used below is really a low-level interface that is really not meant for end users.  The correct/supported way to do this is to use the IKIT interface.  You can query the current sheet using the function (sd-am-inq-curr-sheet) which returns a sel_item.  Then with this sel_item, you can query the sheet structure using (sd-am-inq-sheet (sd-am-inq-curr-sheet)).  This returns a structure with info about the specified sheet along with the sheet scale.  You can get this by using (sd-am-sheet-struct-scale (sd-am-inq-sheet (sd-am-inq-curr-sheet))).  This will return a float number (as a string). to convert this to a number use (sd-read-from-string str).  This will convert a string to whatever data format the string represents.  In this case a floating point number.

 

This assume the lisp file has an (in-package :oli) statement.  If not, prepend each of these function calls with a oli prefix (oli:sd-read-from-string (oli:sd-am-sheet-struct-scale (oli:sd-am-inq-sheet (oli:sd-am-inq-curr-sheet))))

 

steveg

1-Visitor
November 25, 2020

or you can just use: (DOCU::INQ_CURR_SHEET_SCALE)