[Solved] Add Custom Property to Library Item
Posted: Mon May 19, 2014 6:46 pm
Hi,
I am a new user to QCad and cad development, I have a good few years of C++, C# etc under my belt but little JavaScript.
I have been asked to create a plugin for a customer which talks to a database, I send information to the backend which is used to search the database and return results.
The idea is the customer will only need to drop items onto the drawing I provide via the QCad Library.
I worked my way through the user guide today and can see we can add a custom properties to an entity then selecting multiple entites create a Library Item, would it be possible to add custom properties to a Library item rather than the entites contained in the Library item?
There may be a reason why this is not worth while or even technically possible but I thought for my needs (and maybe others) it might be a worth while feature as I can search the document for certain properties on the Library item rather than individual entites?
The plan for the plugin I am writing is once the customer has placed the Library Items onto the drawing they will click a button which will tell the plugin to search through the drawing for items the backend is interested in, once a list is built up we can search the database. I can work around not having the custom property but thought it my be worth adding it in the future?
Thanks,
Andrew.
I am a new user to QCad and cad development, I have a good few years of C++, C# etc under my belt but little JavaScript.
I have been asked to create a plugin for a customer which talks to a database, I send information to the backend which is used to search the database and return results.
The idea is the customer will only need to drop items onto the drawing I provide via the QCad Library.
I worked my way through the user guide today and can see we can add a custom properties to an entity then selecting multiple entites create a Library Item, would it be possible to add custom properties to a Library item rather than the entites contained in the Library item?
There may be a reason why this is not worth while or even technically possible but I thought for my needs (and maybe others) it might be a worth while feature as I can search the document for certain properties on the Library item rather than individual entites?
The plan for the plugin I am writing is once the customer has placed the Library Items onto the drawing they will click a button which will tell the plugin to search through the drawing for items the backend is interested in, once a list is built up we can search the database. I can work around not having the custom property but thought it my be worth adding it in the future?
Thanks,
Andrew.