Possibilities for menu, dynamic buttons

Started by hanslammerts, November 09, 2016, 02:39:39 PM

Previous topic - Next topic

roy_043

Quote from: hanslammerts on January 24, 2017, 11:32:40 PM
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

#31
   ok!  :D

roy_043

#32
... Minor tweak ;) see here.

hanslammerts

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

Quote from: hanslammerts on March 18, 2017, 03:36:58 PM
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:
Quote from: http://docs.autodesk.com/ACD/2011/ENU/filesALR/WS1a9193826455f5ff1a32d8d10ebc6b7ccc-69fb.htmThe 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

Would there be any other way to retieve positions other then getpoint, to make that work?

roy_043

Maybe:
Code (autolisp) Select
(command "_.id" "\\")
(setq pt (getvar 'lastpoint))

hanslammerts

#37
Dear Roy, if these some kind of 'opendcl installed check' function suitable for this one. That would be great.

roy_043

I have added two simple checks to the code. See here for the new version.
(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)
  )
)


kruuger78

Quote from: roy_043 on November 12, 2016, 12:47:37 PM
Edit:
Version 20180417:
Two checks have been added to the code.
WOW!!! Fantastic stuff ?? Thanks Mr. Roy :)

kruuger78

more eye friendly colors variant :)
also colors are saved to registery so can be different for each users.
kruuger

Jim Short

Jim Short

hanslammerts

Very nice Kruuger78!
I'm gonna use your more ellegant colors too