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

World coord in a specialized Model

How do you get a model to use specific world coordinates? I have a Model specialization which sets the MeasurementUnits to WorldCoordinates and the Bounds to the relevant world coord range. This is done in the model constructor. When the diagram is displayed the specialized model is definitely used but the MeasurementUnits and Bounds are set to their defaults (Pixel, 1056x816).

2 Replies

AD Administrator Syncfusion Team December 8, 2003 01:33 PM

Here''s what is probably happening. Those properties are serialized at design-time. You set them in your constructor, but your Form.InitializeComponent() method is turning around and setting them back. One solution is to change the properties through the design-time environment. Another solution is to override the properties in your model, disable design-time serialization using DesignerSerializationVisibilityAttribute, and then always return the values you want from the the property get methods. >How do you get a model to use specific world coordinates? > >I have a Model specialization which sets the MeasurementUnits to WorldCoordinates and the Bounds to the relevant world coord range. This is done in the model constructor. When the diagram is displayed the specialized model is definitely used but the MeasurementUnits and Bounds are set to their defaults (Pixel, 1056x816).


AI Apolon Ivankovic December 8, 2003 05:18 PM

Yep it was the design time serialization that was overriding the values. When I go the design time setting approach, the Model.MeasurementUnits property refuses to stay at a value of World. If the override/visibility-hidden approach is taken, the MeasurementUnits property also doesn''t stay at the Value of World set in the code. Is Model.MeasurementsUnits = World a value option? The work I''m doing is a diagram editor for a legacy system where the graphic work space is 32767x32767 virtual units in size. Can this be achieved using Essential Diagram and what Model settings should I use to achieve this?

Loader.
Live Chat Icon For mobile
Up arrow icon