Author Topic: Radial Menu  (Read 27444 times)

0 Members and 1 Guest are viewing this topic.

ROBBO

  • Bull Frog
  • Posts: 217
Re: Radial Menu
« Reply #15 on: June 05, 2014, 02:04:40 AM »
reltro - it just gets better and better!
The only thing to do with good advice is to pass it on.
It is never of any use to oneself.

Oscar Wilde
(1854-1900, Irish playwright, poet and writer)

WILL HATCH

  • Bull Frog
  • Posts: 450
Re: Radial Menu
« Reply #16 on: June 05, 2014, 02:22:42 AM »
You lispers amaze me. I get so lost in the extra syntax, but here you are creating these ridiculous routines.  I am so spoiled by the meaningful names of the functions I create and use, and the autocomplete in visual studios.
I dare you to come to the dark side  :-D we have cookies

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Radial Menu
« Reply #17 on: June 05, 2014, 03:20:03 AM »

Bhull1985

  • Guest
Re: Radial Menu
« Reply #18 on: June 05, 2014, 07:54:47 AM »
PM me the data you wish to display, if you want to keep it off the forum, or alternatively you can just post the info to be wrapped in a DCL here, and I'll do my best to help get it done. Just a matter of time, been really busy here.

reltro

  • Guest
Re: Radial Menu
« Reply #19 on: June 06, 2014, 08:20:33 AM »
Hey People...

Thanks all for the nice words... pretty good to know it makes sense to so such a stuff...

VERSION 2.2a

@roy_043
Thanks for the links... will look at them closely, it seems to be a good start....

@Bhull1985
Thanks for ur offer, will write u soon...

@WILL HATCH
Enabled the Continous-Mode  :kewl:

BUT...
The command evaluated has to have an end...
The menu pops up again if (= (getvar 'cmdactive) 0)

In the attachment I rebuilt the Line-command to immitate the internal.
Code - Auto/Visual Lisp: [Select]
  1. (    (lambda (P #cmdecho / catch break PointList)
  2.         (setvar 'cmdecho 0)
  3.         (command "_.Line" P)
  4.         (setq PointList (cons P PointList))
  5.         (while
  6.             (not
  7.                 (or
  8.                     (vl-catch-all-error-p
  9.                         (setq catch
  10.                             (vl-catch-all-apply
  11.                                 '(lambda ( / c)
  12.                                     (if (> (length PointList) 2)
  13.                                         (progn
  14.                                             (initget "Undo Close")
  15.                                             (setq c (getpoint (car PointList) "\nSpecify next point or [Close/Undo]:"))
  16.                                         )
  17.                                         (progn
  18.                                             (initget "Undo")
  19.                                             (setq c (getpoint (car PointList) "\nSpecify next point or [Undo]:"))
  20.                                         )
  21.                                     )
  22.                                     (cond
  23.                                         ((= c "Undo")
  24.                                             (setq P (car PointList))
  25.                                             (setq PointList (cdr PointList))
  26.                                             (command "_Undo")
  27.                                         )
  28.                                         ((= c "Close")
  29.                                             (command "_Close")
  30.                                             (setq break 'T)
  31.                                         )
  32.                                         (c
  33.                                             (setq PointList (cons c PointList))
  34.                                             (command c)
  35.                                         )
  36.                                         ('default (setq break 'T))
  37.                                     )
  38.                                 )
  39.                             )
  40.                         )
  41.                     )
  42.                     break
  43.                 )
  44.             )
  45.         )
  46.         (while (= (getvar 'cmdactive) 1)
  47.             (command)
  48.         )
  49.         (if (vl-catch-all-error-p catch)
  50.             (    (lambda (a / )
  51.                     (if (not (wcmatch (strcase a) "*EXIT*,*BREAK*,*CANCEL*"))
  52.                         (*error* a)
  53.                     )
  54.                 )
  55.                 (vl-catch-all-error-message catch)
  56.             )
  57.         )
  58.         (setvar 'cmdecho #cmdecho)
  59.         (princ)
  60.     )
  61.     (getpoint "Specify first point: ")
  62.     (getvar 'cmdecho)
  63. )
  64.  

If someone wants to immitate the others I will insert them to have a continous Menu all over...


reltro

WILL HATCH

  • Bull Frog
  • Posts: 450
Re: Radial Menu
« Reply #20 on: June 08, 2014, 02:02:39 AM »
Enabled the Continous-Mode  :kewl:
:kewl:

With the update to 2015 we can do synchronous commands in .net now.... wink wink

reltro

  • Guest
Re: Radial Menu
« Reply #21 on: June 09, 2014, 02:43:31 PM »
Enabled the Continous-Mode  :kewl:
:kewl:

With the update to 2015 we can do synchronous commands in .net now.... wink wink

ähm ok, that sounds very strange, how does it work? I know just a lil C#.net... I have 2015 here... So if u have time would be nice to give an example how this works? ;)
Whats about (getvar 'cmdactive)? is it 0?



modified the Keyword-Menu by pressing ? on the center
found a bug and rewrote the whole menu...

fixed "Draw-Modify"-Menu attached....


@Bhull1985
In the attchment is also a lambda-expr wich IS the Keyword-Menu...
I would be thankful if u want to build the dcl  :-P

kruuger

  • Swamp Rat
  • Posts: 625
Re: Radial Menu
« Reply #22 on: June 09, 2014, 03:26:11 PM »
@Bhull1985
I would be thankful if u want to build the dcl  :P
just draw something in paint. for sure we can easily make something with dcl.
k.

ROBBO

  • Bull Frog
  • Posts: 217
Re: Radial Menu
« Reply #23 on: June 10, 2014, 04:53:20 AM »
All,

Please find attached version of Radial Menu for Text and Dims.

Special thanks to reltro for all his hard work and permission allowing me to compile this.

Feedback welcome.

Kind regards, Robbo.

Modified: Updated to enable MLeader command to operate with mtext window
« Last Edit: June 10, 2014, 10:24:47 AM by ROBBO »
The only thing to do with good advice is to pass it on.
It is never of any use to oneself.

Oscar Wilde
(1854-1900, Irish playwright, poet and writer)

reltro

  • Guest
Re: Radial Menu
« Reply #24 on: June 10, 2014, 06:56:21 AM »
All,

Please find attached version of Radial Menu for Text and Dims.

Special thanks to reltro for all his hard work and permission allowing me to compile this.

Feedback welcome.

Kind regards, Robbo.

Modified: Updated to enable MLeader command to operate with mtext window

Tanks ROBBO for ur nice work! ;)
[EDIT: as I have seen in the "raw"-Menu, u use different sub-routines as C:t0 (or similar)... would be nice to add them]


@all others...
every one is welcome to compile his own menu... Just write me a PM or an EMail... I will send u the "compiler"...

The only condition to get it, is that the finished Menu will be shared and posted here... ;)
It would be nice to get a lot of different RadialMenus to work with :)


@Bhull1985
I would be thankful if u want to build the dcl  :P
just draw something in paint. for sure we can easily make something with dcl.
k.
will draw some soon... :) thanks for ur nice offer...

It would be also very nice to have a DCL to create the RadialMenu... but this would be a next step...
the time is lil at the moment...

greets
reltro

« Last Edit: June 10, 2014, 07:05:56 AM by reltro »

Bhull1985

  • Guest
Re: Radial Menu
« Reply #25 on: June 10, 2014, 07:43:58 AM »
Yes, just tell me the information to display in a DCL
and I will make it for you :)

ROBBO

  • Bull Frog
  • Posts: 217
Re: Radial Menu
« Reply #26 on: June 10, 2014, 10:32:21 AM »
All,

Please find attached version of Radial Menu for Text and Dims.

Special thanks to reltro for all his hard work and permission allowing me to compile this.

Feedback welcome.

Kind regards, Robbo.

Modified: Updated to enable MLeader command to operate with mtext window

Apologies to those who have downloaded the TEXT_DIMS.lsp. I didn't add the functions to file to allow dialog window for the Mtext and MLeader commands, therefore will not work.

Have added the following code to the file in the OP above:

Code - Auto/Visual Lisp: [Select]
  1. ;; mtext
  2. (defun c:MT ()
  3.         (initdia)
  4.         (command "_.mtext" pause pause)(command)(command)
  5.         (princ)
  6. )
  7. ;; mtext with 0 width
  8. (defun c:T0 (/ pt)
  9.         (initdia)
  10.         (command "_.mtext")
  11.         (if (setq pt (getpoint "\nSpecify insertion point <first corner>: "))
  12.                 (command "_non" pt "_W" 0.)
  13.         )
  14.         (princ)
  15. )
  16. ;; mleader
  17. (defun c:ML1 ()
  18.         (initcommandversion)
  19.         (command "_.mleader")
  20.         (while (> (getvar 'cmdactive) 0)
  21.                 (command pause)
  22.         )
  23.         (princ)
  24. )

Should work fine now. When I tested it, I obviously have the raw data loaded, therefore worked fine.

Kind regards, Robbo.
The only thing to do with good advice is to pass it on.
It is never of any use to oneself.

Oscar Wilde
(1854-1900, Irish playwright, poet and writer)

WILL HATCH

  • Bull Frog
  • Posts: 450
Re: Radial Menu
« Reply #27 on: June 10, 2014, 11:19:42 PM »
ähm ok, that sounds very strange, how does it work? I know just a lil C#.net... I have 2015 here... So if u have time would be nice to give an example how this works? ;)
Whats about (getvar 'cmdactive)? is it 0?

check out http://through-the-interface.typepad.com/through_the_interface/2014/03/autocad-2015-calling-commands.html where they show us how to do it.  Very easy!

Code - C#: [Select]
  1. using Autodesk.AutoCAD.ApplicationServices;
  2. using Autodesk.AutoCAD.EditorInput;
  3. using Autodesk.AutoCAD.Runtime;
  4.  
  5. namespace CommandCalling
  6. {
  7.   public class Commands
  8.   {
  9.     [CommandMethod("IBS")]
  10.     public void InsertBlockSync()
  11.     {
  12.       var doc =
  13.         Application.DocumentManager.MdiActiveDocument;
  14.       var ed = doc.Editor;
  15.  
  16.       // Our insertion point is hardcoded at 10,10
  17.  
  18.       ed.Command("_.INSERT", "TEST", "10,10", 1, 1, 0);
  19.  
  20.       ed.WriteMessage("\nWe have inserted our block.");
  21.     }
  22.  
  23.     [CommandMethod("IBA")]
  24.     async public void InsertBlockAsync()
  25.     {
  26.       var doc =
  27.         Application.DocumentManager.MdiActiveDocument;
  28.       var ed = doc.Editor;
  29.  
  30.       // Let's ask the user to select the insertion point
  31.  
  32.       await ed.CommandAsync(
  33.         "_.INSERT", "TEST", Editor.PauseToken, 1, 1, 0
  34.       );
  35.  
  36.       ed.WriteMessage("\nWe have inserted our block.");
  37.     }
  38.   }
  39. }

reltro

  • Guest
Re: Radial Menu
« Reply #28 on: June 12, 2014, 03:56:00 AM »
Thanks WILL HATCH...
Will have a look at it... At the moment I don't really get the point, but I'm going to check it out...

SRY people, but at the moment I don't have any time to think about this. Will be back in about 2 weeks, hope its not too late to build the DCL stuff then... Just a LITTLE busy at the moment...

Thanks in advance

reltro...

ROBBO

  • Bull Frog
  • Posts: 217
Re: Radial Menu
« Reply #29 on: June 13, 2014, 08:43:18 AM »
Text enhancements made.
« Last Edit: June 17, 2014, 02:35:11 AM by ROBBO »
The only thing to do with good advice is to pass it on.
It is never of any use to oneself.

Oscar Wilde
(1854-1900, Irish playwright, poet and writer)