1. My last answer was not completed, i don't know why but it seams my copy&paste wasn't successful and i didn't notice it.
2. Rotation input:
The command is asking for a Rotation ANGLE. It is possible to input a number (angle) and Autocad know:
Only a Number, ok - this is the angle my user want to rotate the xref.
Or you answers with coordinates, then Autocad will calculate the angle for you, from ucs origin0,0,0 angle 0 to that point.
Take a calc and give me the answer to that question: What is the angle between 0,0 and 0,0 ?
Impossible to calculate the angle.. This is why i use 1,0 - you can use 0.533,0 or 123456,0 - it is the same result.
Angle from 0,0 to 500,0 or 1000,0 is 0
voila.
Why i don't send just a 0 as angle direct? You are in a rotated ucs and angle0 is the angle0 of the current ucs - you don't want "this angle0"
3. "macros usually work if saved in an SCR file and drag-dropped."
No, thats wrong. Just for very simple and not pretty well written menu-macros is it working
Script: Ok, It's not unusual to call all these things script, also my hand written words on the paper for a program strcture is a script (also the shopping list from my wife, it she uses a good order to take the item).
But don't use this word for your autodesk - question, except you mean a script! 😉
Menumacro
That is what i posted before, such macros are in most of all "button" you can press in Acad,
but autocad also have SCRIPTs! Textfiles with the file extension *.SCR
If I talk about "Script" i mean autocad script, if i mean Lisp, i call it Lisp, macro = macro, action macro = action macro and VBA = VBA or VBA macro
For me and a lot of other users it's a good choice.
Back to the topic and SCRIPT:
In scripts you can not stop for user-input, but without:
;;START
_.-XREF
_a
D:/0.DWG
*0,0,0
1
1
*1,0
;;END
>"In scripts you can not stop for user-input, but without:"
oh, but if you are using LISP you can stop for User input, also in Scripts
;; MyScript
(command "_.-XREF" "_a" "D:/MyXfile.dwg" (trans (getpoint "Insertionpount: ") 0 1) (trans '(1 0 0) 0 1) 1 1 0)
Your last answer sounds that a solution by Lisp is welcome too?
Ok, the the last sample for "waitung for unser input in script" is a sample for Lisp files too.
(command "_.-XREF" "_a" (getfiled "" "" "dwg" 😎 (trans (getpoint "Insertionpount: ") 0 1) (trans '(1 0 0) 0 1) 1 1 0)
I used TRANS lisp-function for UCS->WCS, because in this case it is simpler as the "*" thing.