cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Decimal Sheet Scale

ThomasKirkman
16-Pearl

Decimal Sheet Scale

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
Creo Element\Direct Modeling 20.6.0.0.0
1 ACCEPTED SOLUTION

Accepted Solutions
ptc-4154876
5-Regular Member
(To:ThomasKirkman)

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

View solution in original post

2 REPLIES 2
ptc-4154876
5-Regular Member
(To:ThomasKirkman)

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)

Top Tags