+1 800 256 3608 (toll-free in North America) or +49 7531 9060-10| service@combit.com

SetMetric in C++ through dll

hi All,

when I was doing 32 bit List Label ocx control i used SetMetric api for setting the metric but now i want to use cmLL21.lib for that there is no api for Setting to metric , Could you please help me in setting to mm or inches

Previous code
m_cDevList. SetMetric(CXCtrlDevList::METRIC_1_10_MM) //where DevList (List label ocx control)

m_cDevList.SetMetric((m_bMetric ? METRIC_1_10_MM : METRIC_1_100_INCH))

please let me know how to do the same logic by using cmLL21.lib API.

You can set the units via LL_OPTION_UNITS when using the API.

Thanks for the reply . How to set Metric 1/10 or different metric 1/100 could you please let me know any Api for that.

LLoptions_units only sets metric or inches but the metric 1/10 or 1/100 .

Please let me know ur thoughts on the same.

Could you please give one example for that …like for metric 1/100

The available values are documented here.

Thanks for the reply. I replaced from

//Old Code
m_cOCx.SetMetric(CXCtrlDevList::METRIC_1_10_MM) to

//New Code
LlPrintSetOption(m_hJob, LL_PRNOPT_UNITS, LL_UNITS_MM_DIV_10);

Please let me know if it is ok ?

1 Like

Looks good to me :slight_smile:. You can easily verify if it is working as expected.

© combit GmbH