We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Converting a node''s MeasurementUnits

I am saving a diagram to a database. All was working well until I found that if you change a diagram's measurement units in the middle of creating a diagram, the nodes will all have different measurement units.

e.g. I start with a diagram whose measurement unit is pixels. I lay down two nodes. They both have measurement units as pixels. I then change the diagram's measurement units to inches and lay down another node. It's new measurement unit is now inches.

I want to store them all as with pixel measurement unit.

How do I convert?


2 Replies

AM Ajeet M Syncfusion Team December 18, 2008 01:32 PM UTC

Hi RAS,

You can set your nodes properties as follows when you want that their MeasureUnits should never change.

********
Node some_node;

some_node.MeasurementUnit = MeasureUnits.Inch;
some_node.InheritContainerMeasureUnits = false;

********

The above code will ensure that the MeasureUnit for the Node "some_node" will always remain to "Inch" irrespective of Model's MeasureUnits.

Attached with this mail is my sample file for the same.

Let me know if you shall need any further clarifications here.

Happy Coding!

-Ajeet





Diagram_WF_MeasureUnits_5ed96624.zip


RA Ron Alan Sawyer December 21, 2008 09:19 PM UTC

Thank you, this fixed my problem.


Loader.
Live Chat Icon For mobile
Up arrow icon