Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

assignment to protected symbol: c:bb

2 REPLIES 2
Reply
Message 1 of 3
JamesMaeding
463 Views, 2 Replies

assignment to protected symbol: c:bb

I like to use several key-ins for my own commands in civil3d 2015.

I do that with lisp, so something like:

 

(DEFUN C:BB    () (PRINC "\nBreak object and erase selected")(COMMAND "BREAK" PAUSE "F" PAUSE "@" "ERASE") (PRINC))

 

but since civil3d has BB as a transparent command, I typically must undefined it first with:

(COMMAND "UNDEFINE" "BB")

 

now I am getting an error on the undefine:

Command: (COMMAND "UNDEFINE" "BB")
Unknown command name.nil

 

then when I run the defun:

(DEFUN C:BB    () (PRINC "\nBreak object and erase selected")(COMMAND "BREAK" PAUSE "F" PAUSE "@" "ERASE") (PRINC)), I get:


; User warning: assignment to protected symbol: c:bb <- #<SUBR @000000002f8da110 c:bb>
c:bb

 

How is it that it says command BB is unknown, then it says its a protected symbol?

This only happens in civil3d of course, vanilla acad does not have those transparent commands.

thx


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

2 REPLIES 2
Message 2 of 3
Jeff_M
in reply to: JamesMaeding

Command: (defun c:bb() (command "regenall")(princ))
c:bb

Command: BB
regenall Regenerating model.

 

I only get the warning when the VLIDE is open and the option to display the message is selected. The new bb command does work as expected, however, in either case.

10-5-2016 7-40-53 PM.png

Jeff_M, also a frequent Swamper
EESignature
Message 3 of 3
JamesMaeding
in reply to: Jeff_M

yah, I guess I was opening the vlide in order to copy the code and paste.

I was just wondering why the other items I undefine, like AD, do not give the "unknown command name" error.

 

This all came about as users were wondering why they see "unknown command name" appear in the command line on startup.

That happens no matter what, the vlide is not involved.

thanks Jeff!


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report