@robert06 wrote:
Using 'bactiontool' command without a lisp selection methods other than picking a parameter with cursor are available neither (last, previous), you'll get the same error message:
*Invalid selection*
Expects a single object.
In autocad a similar issue is present with basic 'offset' command.
Strangly it never tells me it "Expects a single object." (for the SS1 position) and while testing it accepts the selection set, not the single object... (which is totally incomplete anyway, as you can see with the entget posted earlier.) -not that i got it to work though.
When using the original code i get:
Command: (setq set1 (ssget "X" '((-4 . "<NOT")(-4 . "<AND")(0 . "*ACTIONENTITY")(-4 . "AND>")(-4 . "NOT>"))))
<Selection set: 40>
Command: (if (and (setq ss (ssget "x" '((0 . "ROTATIONPARAMETERENTITY"))))
((_> (setq i -1)
((_> (setq y -1)
((_> )
(_> (repeat (sslength ss)
((_> (setq ss1 (ssname ss (setq i (1+ i))))
((_> (setq y (+ y -0.5))
((_> (setq apt (list 4 y 0))
((_> (command "bactiontool" "r" ss1 set1 "" apt)
((_> )
(_> )
bactiontool
Enter action type [Array/Lookup/Flip/Move/Rotate/Scale/sTretch/Polar stretch]: r
Select parameter:
Select parameter:
Select parameter:
Select parameter:
Specify selection set for action
Select objects: bactiontool
*Invalid selection*
Expects a point or Window/Last/Crossing/BOX/ALL/Fence/WPolygon/CPolygon/Group/Add/Remove/Multiple/Previous/Undo/AUto/SIngle
; error: Function cancelled
Select objects: *Cancel*
As you can see, it asks for a parameter 4 times (should be just 1) THEN it asks for a selection set.
At the prompt "Select objects" (=multiple!) it answers: BACTIONTOOL - which is a repeating of the initial command.
THEN it tells you BACTIONTOOL is a *Invalid selection* expecting a point or blah,blah,blah.
BTW: i'm testing the code while editing a dynamic block including rotations.
edit:
What happens is that the function ignores most if not all entries.
Select parameter: ss1 (ignored ?)
Select parameter: set1 (ignored ?)
Select parameter: "Empty space" (ignored ?)
Select parameter: apt (accepted ?)
Specify selection set for action
Select objects: <as there's no more preset answers within your "command" statement, it repeats the last command: BACTIONTOOL = invalid selection>