Author Topic: Possibilities for menu, dynamic buttons  (Read 9673 times)

roy_043

  • Sr. Member
  • ****
  • Posts: 369
Re: Possibilities for menu, dynamic buttons
« Reply #30 on: January 25, 2017, 08:02:42 AM »
Hi Roy
It needs a .._reset function for its location.
I noticed that it can stay on the disconected monitor..
New version in the usual place.

hanslammerts

  • Member
  • *
  • Posts: 38
Re: Possibilities for menu, dynamic buttons
« Reply #31 on: January 27, 2017, 01:40:38 AM »
   ok!  :D
« Last Edit: January 27, 2017, 01:43:54 AM by hanslammerts »

roy_043

  • Sr. Member
  • ****
  • Posts: 369
Re: Possibilities for menu, dynamic buttons
« Reply #32 on: January 29, 2017, 11:23:41 AM »
... Minor tweak ;) see here.
« Last Edit: January 29, 2017, 11:26:49 AM by roy_043 »

hanslammerts

  • Member
  • *
  • Posts: 38
Re: Possibilities for menu, dynamic buttons
« Reply #33 on: March 18, 2017, 03:36:58 PM »
Hi there

I'm wondering what keeps routines like beneith in combination with this OpenDCL toolbar from acting transparent.
Check this screenshot. I think it has somthing to do with the OpenDCL code how it works. Would be great if it can be overcome..

Thanks anyway
Hans

https://youtu.be/zAb26bR-emU



Code: (autolisp) [Select]

(defun ent-xline (pt vec lyr /)
  (entmake (list '(0 . "XLINE")
'(100 . "AcDbEntity")
(cons 8 lyr)
'(100 . "AcDbXline")
(cons 10 (trans pt 1 0))
(cons 11 vec))))
   
(defun C:xv (/ pt)
  (while (setq pt (getpoint "\nSpecify Vertical XLINE position: "))
    (ent-xline pt (getvar "ucsydir") "X_hulplijn_")))


(defun C:xh (/ pt)
  (while (setq pt (getpoint "\nSpecify Horizontal XLINE position: "))
    (ent-xline pt (getvar "ucsxdir") "X_hulplijn_")))

roy_043

  • Sr. Member
  • ****
  • Posts: 369
Re: Possibilities for menu, dynamic buttons
« Reply #34 on: March 19, 2017, 03:52:42 AM »
I think it has something to do with the OpenDCL code how it works.
The problem is caused by a limitation of the AutoCAD getpoint Lisp function:
The user cannot enter another AutoLISP expression in response to a getpoint request.

In BricsCAD this limitation does not exist and the toolbar can be used transparently in your C:xv and C:xh functions without any issues.

hanslammerts

  • Member
  • *
  • Posts: 38
Re: Possibilities for menu, dynamic buttons
« Reply #35 on: March 19, 2017, 05:41:08 AM »
Would there be any other way to retieve positions other then getpoint, to make that work?

roy_043

  • Sr. Member
  • ****
  • Posts: 369
Re: Possibilities for menu, dynamic buttons
« Reply #36 on: March 19, 2017, 12:38:22 PM »
Maybe:
Code: (autolisp) [Select]
(command "_.id" "\\")
(setq pt (getvar 'lastpoint))

hanslammerts

  • Member
  • *
  • Posts: 38
Re: Possibilities for menu, dynamic buttons
« Reply #37 on: April 14, 2018, 02:45:07 AM »
Dear Roy, if these some kind of 'opendcl installed check' function suitable for this one. That would be great.
« Last Edit: April 14, 2018, 03:21:44 AM by hanslammerts »

roy_043

  • Sr. Member
  • ****
  • Posts: 369
Re: Possibilities for menu, dynamic buttons
« Reply #38 on: April 17, 2018, 03:28:37 AM »
I have added two simple checks to the code. See here for the new version.
Code: [Select]
(setvar 'cmdecho 0)
(vl-cmdf "_Opendcl")
(setvar 'cmdecho 1)

; 20180417
; ODCL check.
(if (not dcl-Project-Load)
  (progn
    (princ "\nError: OpenDCL runtime not available ")
    (exit)
  )
)

; 20180417
; Dialog check.
(if (not (findfile "Osnaps.odcl"))
  (progn
    (princ "\nError: \"Osnaps.odcl\" file not found ")
    (exit)
  )
)

hanslammerts

  • Member
  • *
  • Posts: 38
Re: Possibilities for menu, dynamic buttons
« Reply #39 on: April 19, 2018, 03:38:52 AM »
Splendid work!

kruuger78

  • Member
  • *
  • Posts: 2
Re: Possibilities for menu, dynamic buttons
« Reply #40 on: December 11, 2018, 10:24:09 AM »
Edit:
Version 20180417:
Two checks have been added to the code.
WOW!!! Fantastic stuff ?? Thanks Mr. Roy :)

kruuger78

  • Member
  • *
  • Posts: 2
Re: Possibilities for menu, dynamic buttons
« Reply #41 on: December 16, 2018, 10:49:20 PM »
more eye friendly colors variant :)
also colors are saved to registery so can be different for each users.
kruuger

Jim Short

  • Full Member
  • ***
  • Posts: 238
    • Tahl Inc
Re: Possibilities for menu, dynamic buttons
« Reply #42 on: January 13, 2019, 07:30:42 AM »
Another Idea.
Jim Short

hanslammerts

  • Member
  • *
  • Posts: 38
Re: Possibilities for menu, dynamic buttons
« Reply #43 on: May 27, 2019, 01:27:26 PM »
Very nice Kruuger78!
I'm gonna use your more ellegant colors too