Get pickCoordinate without Gui Action

Use this forum for all posts and questions about the free QCAD Community Edition version 3

Moderator: andrew

Post Reply
atomkarinca
Registered Member
Posts: 2
Joined: Fri Oct 22, 2021 2:26 pm

Get pickCoordinate without Gui Action

Post by atomkarinca » Fri Oct 22, 2021 2:33 pm

Hi everyone.

I have been working on an AutoCAD lisp routine and I want to translate that to QCAD. So far, simple.js has been wonderful. But when I try to get a coordinate to draw a circle, all documentation I can find is using guiAction. Is there a way to invoke this without a guiAction? I want to be able to prompt user for a coordinate after some settings has been set by the user.

Thanks in advance.

CVH
Premier Member
Posts: 3364
Joined: Wed Sep 27, 2017 4:17 pm

Re: Get pickCoordinate without Gui Action

Post by CVH » Fri Oct 22, 2021 3:04 pm

Hi,
Interaction with the user is usually done by UI or a dialog, a widget.
There is also an example file for this ... Let me see ...

Found it ... over here: :wink:
https://github.com/qcad/qcad/tree/maste ... entWidgets

It is not that hard to modify the UI with Qt Designer.
Use a custom named copy! Should be in your custom script folder.
Copy over what code is required.

One can also create an Options Toolbar widget ...
Then it would be best to study the code of an existing similar GUI action.

As last one could use a single command line entry.

Regards,
CVH

atomkarinca
Registered Member
Posts: 2
Joined: Fri Oct 22, 2021 2:26 pm

Re: Get pickCoordinate without Gui Action

Post by atomkarinca » Fri Oct 22, 2021 6:49 pm

OK.

As I understand it, I should change my workflow and make every action connected to a widget. I guess that would be less hassle. Thanks

Post Reply

Return to “QCAD Community Edition”