Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Solved! Go to Solution.
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
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
or you can just use: (DOCU::INQ_CURR_SHEET_SCALE)