Hello, developers.
I need detailed documentation on developing LibreCAD plugins. The information on this website is too sketchy:https://wiki.librecad.org/index.php?title=LibreCAD_Plugin_Development For example, how do I write the plugin code to: Get text input from the user? Obtain the input coordinates? Additionally, how do I write the code to: Get all objects and their related attributes (such as coordinates, length, enclosed area, enclosed circular area, filled area of the pattern, etc.) in the current user's selection set? Furthermore, I would like to know how to: Create a small button tool that, when clicked, pops up a custom interface that I've defined. So, where can I find more detailed documentation for plugin development?Or videos with rich plugin development examples? Thanks a lot. |
Administrator
|
Welcome @timberners!
I assume, this post is related with this GitHub issue #1821? If not, read it anyway. What is tried to explain there, is, that there is not more documentation as already found and linked there. So the best way is to have a look at the existing plugins, read and understand the source code. There are various plugins, which show most, if not all possibilities of the plugin interface. Understanding the functionality and code of existing plugins should then help for developing new plugins. I have the feeling, that your request is related with PCBWay. Is this true? I'm in contact with them and I already communicated, that I can add their requested functionality. The LibreCAD plugin interface is probably not the right way to implement it, probably it's even not possible with our plugin interface. So my estimation is, it should be added to the application direct. Otherwise, tell us something about your plans for the plugin, then we can probably give more detailed advise and support. Armin
investing less than half an hour into Search function can save hours or days of waiting for a solution
|
Thank you very much.
Your advice is well. But the existing plug-in code does not provide a complete picture of what the plug-in can do. Or not know all of the plug-in interface apis. I think plugins have a lot of potential. In China, many plugins have expanded the functions of AutoCAD, making AutoCAD available to users from all walks of life and professional fields. Just like, each profession (construction field, mechanical field, etc.) can have a special plugin to improve work efficiency. Yeah, it's me. No,my request is related with construction field and Construction engineering calculation field. |
Can you have a look at our v3's script feature?
The current v2 plugin features are quite limited. Of course, we can work to extend the plugin features in v2, but the benefits may not justify that direction of development.
|
Administrator
|
In reply to this post by timberners
This is LibreCAD, not AutoCAD, so you can't compare them or their plugin interfaces.
All you can do with LibreCAD's plugin interface is contained in https://github.com/LibreCAD/LibreCAD/tree/master/librecad/src/plugins. There you'll find document_interface.h and qc_plugininterface.h, they declare the plugins possibilities. Have a look into the classes there to see what the interface provides. Basically it is about requesting entities, selected or all, to iterate and delete or modify them, or add new entities. So it is rather rudimentary compared to AutoCAD. The existing plugins show various use cases and I think most of the possibilities of LibreCAD's plugin interface. That's why we recommend to study the existing plugins. You have to take what LibreCAD provides, not what you suspect from AutoCAD. As I already proposed, when you clarify your plans, we can estimate if you can realize them or recommend an existing plugin, which has similar functionality. Armin
investing less than half an hour into Search function can save hours or days of waiting for a solution
|
Free forum by Nabble | Edit this page |