Copy and Past

Sep 4, 2013 at 9:07 PM
Hello Kurt. Please tell me how can i get an id of shape? Or please help me with this: behind any shape in my project there are math object...(class Some_class for example) how can i copy and past shape with this math object... There is a way to access
buffer of shapes witch have been copyed??? С уважением Будылкин А.А.
Coordinator
Sep 9, 2013 at 8:12 AM
Shapes do have an Id property but this Id is null until it is saved to file/database the first time.
So all new and unsaved shapes do not have an Id.

You have two options to solve this problem:
a) Derive a set of new shapes that override the Clone() method and copy the shape's math object.
b) Implement the IModelObject interface in your math object and assign it to the ModelObject property of the shapes.
Sep 16, 2013 at 9:55 PM

Thanks) I solve this problem)

But can you help with other?

I need that if i click on property button in context menu, there are opend second form and on it there are propertyGrid with all shape property.

Please tell me how can i do it?

С уважением Будылкин А.А.

9.9.2013 10:13:38 пользователь KurtHolzinger ([email removed]) написал:


From: KurtHolzinger

Shapes do have an Id property but this Id is null until it is saved to file/database the first time.
So all new and unsaved shapes do not have an Id.

You have two options to solve this problem:
a) Derive a set of new shapes that override the Clone() method and copy the shape's math object.
b) Implement the IModelObject interface in your math object and assign it to the ModelObject property of the shapes.

Read the full discussion online.

To add a post to this discussion, reply to this email ([email removed])

To start a new discussion for this project, email [email removed]

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com

Coordinator
Sep 17, 2013 at 8:33 AM
Andrey_B wrote:
I need that if i click on property button in context menu, there are opend second form and on it there are propertyGrid with all shape property.
Please have a look at the demo program "ArchiSketch", located in the source code directory.
This demo uses a context menu that has an additional context menu entry that does exactly what you want to do:
Opening a dialog for editing the shape properties.
For further information on how to customize the context menu, please see documentation "Programmer Tasks > Customizing Context Menus".