Lisp Insert with Attribute

Another LISP mistery has crossed my path:I have an existing LISP routine which inserts a block called 'Marker'. The block has an attribute called 'num' and that should be updated with a counter. Following line is used:(COMMAND "._insert" "MARKER" MP "2" "2" "0" num)This line works in Autocad but in BricsCad it generates an error and the routine is aborted. If the 'num' part is omitted and the line looks like(COMMAND "._insert" "MARKER" MP "2" "2" "0") it works but then there is no numbering.Is there a different syntax for BricsCad?TIA,Arno van Eeuwen

Comments

  • I have a simular routine and it works without any problems with Bricscad(COMMAND "INSERT" "BLOCKNAME" Point Scale "" "" Number)Where Number is the attribute value.Make sure the block is present in current drawing.It should work like this.Florian

  • Not certain, but isn't there a setvar for having attributes appear in a dialogue box or on the command line when inserting blocks? Dialogue boxes usually/always? interrupt lisps.

  • For most lisp routines the first things I try to do is set these three SETVARS to safe values. (setvar "CMDECHO" 0) (setvar "CMDDIA" 0) (setvar "ATTDIA" 0)At the end of the routine reset these to ther original settings.Hope this helps.Rick

  • The routine I'm refering to does take care of these system variables indeed. It was the INSERT command which had to be changed to the format Florian sent.Thanks for the input!

This discussion has been closed.