We need to design an application that will read the number of certain objects, that were dragged on the application. How to approach this?

We need to count all kinds of different images and do something (inject them in a database / give them to an webapi).

What is the best way to do this?
- Read the file, make distinction in the objects programmaticly?
- Using VBA in CorelDraw, and listen to the events?
- Write a macro in VBA , CorelDraw that counts everything?
- ... other strategies?

What is the best strategy in CorelDraw to count objects?

Parents
No Data
Reply
  • If you need to know the number of objects in real time (ie, it is important to update the count immediately a new object is added), then a VBA macro that listens to the events is probably the only way you could achieve that. But in practice, you will probably need to monitor for deletion of objects too, otherwise the count will be too high. You also need to consider whether somebody might drag several objects or a group of objects in at the same time and whether groups should be counted individually. And what if somebody drags in something complex like a 10 step blend -- should that count as one object, three objects or 11?

    If it is sufficient to wait until the design is complete, then a VBA macro to count the objects is likely to be easier because you will not have to consider extra cases to cover possible deletion of editing of existing objects.

    In practice, if you want to know the count in real time and do not always begin from an empty document you may have to do both, otherwise you will not know how many objects are already in the document when you open it.
Children