Because you are interrupting command functionality...Do I? I assumed the command would only end after the loop. Any ideas how to fix it?
You are making it too complicated. You should be able to replace those lines with these two and get the result you are looking for.Code - Auto/Visual Lisp: [Select]
Because you are interrupting command functionality...
Unfortunately this doesn't work for me, because the command is terminated as soon as you pick the first point.
Why not like this :Code - Auto/Visual Lisp: [Select]
Unfortunately this doesn't work for me, because the command is terminated as soon as you pick the first point.
Unfortunately, this tells me you are trying to build a function that may be trying to do too much. Are you building your functions like this (or just one giant function that does 50 different things)?Code - Auto/Visual Lisp: [Select]
;; drawline ;; Issues the line command and returns the first picked point. ) ;; my main function ;; ; first picked point. ;; NOTE: Without the line below, the prompt will be make immediately, ;; but if you want to delay the prompt, uncomment the line below. ; (while (eq 1 (logand 1 (getvar 'cmdactive))) (command pause)) lpt2 ) )
<snip>retrieve the point from the line command, if only one point is selected or alternatively the line entities when more than one point is selected <snip>Wait a minute!? I just re-read you initial post.
<snip>retrieve the point from the line command, if only one point is selected or alternatively the line entities when more than one point is selected <snip>Wait a minute!? I just re-read you initial post.
You want to get which point from the line command (the first/last point)?
Also, you want to get the line segment(s)?
I'm confused.
"(command "\\")" means "PAUSE". Pause is one of those things like: PI (a constant) and "may not" be defined (very rare and if that were to happen, you'd have far larger problems); I prefer the gamble (to be descriptive in my programs).
; With the `objectOpenedForModify` event:
; Entget: nil
; | Erased: nil
; | Readable: nil
; | ID: "1915256028368"
; | Obj: "Automation Error. Description was not provided."
; With the `objectModified` event:
; Entget: ((-1 . <Entity name: 1d7fbf004e0>) (0 . "LWPOLYLINE") (330 . <Entity name: 1d7fbf004d0>) (5 . "28E") (100 . "AcDbEntity")
; (67 . 0) (8 . "0") (62 . 0) (6 . "ByBlock") (100 . "AcDbPolyline") (90 . 2) (70 . 1) (43 . 0.5) (38 . 0.0) (39 . 0.0)
; (10 -0.0625 0.0) (40 . 0.5) (41 . 0.5) (42 . 1.0) (91 . 0) (10 0.0625 0.0) (40 . 0.5) (41 . 0.5) (42 . 1.0) (91 . 0) (210 0.0 0.0 1.0))
; | Erased: nil
; | Readable: T
; | ID: "2027156407520"
; | Obj: #<VLA-OBJECT IAcadLWPolyline 000001d7fbccfab8>
; callback foo within the `objectModified` event
(setq o
(vla-ObjectIDToObject
(car arg) ; IAcadDatabase
(LM:ename->objectid (last arg))
)
)
(princ (vlax-get o 'Coordinates))
; I always get this:
(-0.0625 0.0 0.0625 0.0)
(because (cdr (assoc 10 enx)) doesn't match the picked point - not even close. )for me your GetpointFromLine:CB2 shows the correct results
(because (cdr (assoc 10 enx)) doesn't match the picked point - not even close. )for me your GetpointFromLine:CB2 shows the correct results
Hmm... that is interesting, for me it is always the same point - Tested multiple times and I have triple-checked for any global variables that I may have missed.(setvar "DYNMODE" 0)
(because (cdr (assoc 10 enx)) doesn't match the picked point - not even close. )for me your GetpointFromLine:CB2 shows the correct results
Hmm... that is interesting, for me it is always the same point - Tested multiple times and I have triple-checked for any global variables that I may have missed.
Maybe someone else to try it on his machine and give us feeback ?
Hmm... that is interesting, for me it is always the same point - Tested multiple times and I have triple-checked for any global variables that I may have missed.(setvar "DYNMODE" 0)
(because (cdr (assoc 10 enx)) doesn't match the picked point - not even close. )for me your GetpointFromLine:CB2 shows the correct results
Hmm... that is interesting, for me it is always the same point - Tested multiple times and I have triple-checked for any global variables that I may have missed.
Maybe someone else to try it on his machine and give us feeback ?
Interesting, I also get the correct point, but only when I pick a second one, which would defeat the purpose.
But I haven't tried my hand at reactors yet, so your code mostly just goes over my head right now.