Command Repeats with Unknown Command

Command Repeats with Unknown Command

J_Monday
Explorer Explorer
733 Views
2 Replies
Message 1 of 3

Command Repeats with Unknown Command

J_Monday
Explorer
Explorer

Hello,

 I having a hard time implementing my search results to my issue. It seems like a common mistake, but I cannot understand where to fix the issue. I've tried removing any possible additional "" and tried replacing the hyphen before the command with a period or underscore. The same result happens.

 

The command works as needed. After the routine finishes, the command echo's with an "unknown command". See attached image please.  Thank you for the advise.

 

;.... Xref Delete 2017 FBC notes & Details and Loads 2020 FBC....

(defun C:trump2020 ()
(setvar "cmdecho" 0)
(command "-xref" "Detach" "2018 STANDARD DETAILS" "" "" "")
(command "-xref" "Attach" "2020-StandardDetails" "1980,0" "" "" "")
(command "draworder" "Last" "" "Back" "")
(command "-xref" "Detach" "2018-NOTES PAGE" "" "" "")
(command "-xref" "Attach" "2020-NotesPage" "1500,0" "" "" "")
(command "draworder" "Last" "" "Back" "")
(command "-xref" "Unload" "WindowProtectionSystem" "" "" "")
(setvar "cmdecho" 1)
(princ)
)

 

0 Likes
Accepted solutions (1)
734 Views
2 Replies
Replies (2)
Message 2 of 3

cadffm
Consultant
Consultant
Accepted solution

Start with the first (command statement.

 

Type in your commandline

-xref<enter>

Look what Acad ask for,

Type in detach<enter>

Look what Acad ask for,

and so on.

 

This way you will see the problem.

 

I don't think -XREF need more input than the detach option and reference name, or?

 

 

 

Sebastian

Message 3 of 3

J_Monday
Explorer
Explorer

Got it. Thank you. I had way too many "" at the end of the -xref>detach portion. Below is the final version without issues.

 

(defun C:trump2020 ()
(setvar "cmdecho" 0)
(command "-xref" "Detach" "2018 STANDARD DETAILS")
(command "-xref" "Attach" "2020-StandardDetails" "1980,0" "" "" "")
(command "draworder" "Last" "" "Back")
(command "-xref" "Detach" "2018-NOTES PAGE")
(command "-xref" "Attach" "2020-NotesPage" "1500,0" "" "" "")
(command "draworder" "Last" "" "Back")
(command "-xref" "Unload" "WindowProtectionSystem")
(setvar "cmdecho" 1)
(princ)
)

 

0 Likes