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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! 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
ACCEPTED SOLUTION

Accepted Solutions

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

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)

Announcements


Top Tags