Showing results for 
Search instead for 
Did you mean: 

Removal of units when exposing variables!


Hello there,


I have been investigating about this issue for days with no success.


In order to improve manufacture traceability of parts, we show in the drafts the measures needed for the material, in order to build that part. To avoid errors and improve efficiency, that info is exported from the variables used to build up the part inside Solidedge. Moreover, all that values are managed by our in-house application with a number of features.


In images:

units_01.pngDesign variables exposed

units_02.pngTable with exposed variables

As you can see, the exposed variable contains the units, in this case mm. Thus, those 'mm' are shown in the table and any field which references them.


Most companies always use the same units, mm in our case, which makes all that info redundant. Moreover, a lot of space is wasted in the table and the reading becomes difficult when you have dozens of components in the same draft table. Further functionality through the API needs to remove those 'mm' from the text in order to manage the numerical value, more ugly and boring stuff...


Last versions of Solid Edge ST allow the formatting of the variables in callouts, in order to adjust decimals or remove units, but only within the part itself. That functionality seems not allowed from outside, when dealing with the exposed version of the variable, which is treated as text, not a numerical value. The draft table falls into this category, so the removal of the units seems not available.


The only and ugly workaround I have found is using additional variables inside the part without units (defined as 'scalar' in the variable table) linked to the original ones by a simple '=' formula, and then exposing this scalar value. All that for each variable of every part, which is tedious and slows down the whole design process. Since most exposed variables are design measures, swithing them to scalar is not possible.


Any clues of how to get rid of those ugly 'mm' when exposing?


Thanks in advance for the maybe-too-long reading!


Re: Removal of units when exposing variables!

Gears Phenom Gears Phenom
Gears Phenom



Open a draft file and go to: Solid Edge App button -> Solid Edge options -> General, here toggle off "Display unit of measurement labels" option.




Re: Removal of units when exposing variables!

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Did you try the Format button to the right of the Property Text field?

Or just add /NU to the property text in Parts List.


Re: Removal of units when exposing variables!


Thanks for your answer, but that doesn't work.


That switch simply hides or shows the units when you inputo numeric values in a field, it has no effect on exported data through exposed variables.


Anyway, thanks for your interest.


It has been surprising not finding anyone with this issue with units. Most of the time, units are something to avoid when working with numeric data, and they should be placed over a new conceptual layer, but just for print/show purpose. SE API shows this beahaviour, since internally it always deals with meters, just formatting the values when showing to the user.


However, seems that this adimensionality is not retained when exposing variable stuff from parts to drafts.

Re: Removal of units when exposing variables!

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom
You sure that %{WIDTH/CP/NU|G} does not work?

Re: Removal of units when exposing variables!


Wow! This really did the trick!


I had tried that in the past, but the format button was not available. I have investigated why, however.


Currently, in order to recall the exposed variable MY_VAR y had this snippet defined in my table:




This showed the value, but with no possibility of formatting and no effect using:




Deleting and building again the calling to the variable, now I got this:




SE automatically adds /CP, which is suited to refer to a Custom Property, overriding natural values. That code should't be needed as far as my variable name has no conflict with internal defied variables, or at least I guess so. But anyway, it doesn't disturb us! The fun fact is that, with /CP added, now I can access to the format dialog and /NU works.


%{MY_VAR/CP/NU|G} My life is quite bette with this.


I guess my table format needed some updating... I feel all this is a bit weird, however.


Much thanks!