Well my elation was short lived

As when I copied the new code for rb49 to rb41-48 the code failed!
This is what works:
Code: Select all
(defun INSERT_BLOCK_VIEW ()
(if (= NEWTILE "rb31")
(SET_BLOCK) ;GOTO SET BLOCK
) ;_ end of if
(if (= NEWTILE "rb32")
(SET_BLOCK) ;GOTO SET BLOCK
) ;_ end of if
(if (= NEWTILE "rb33")
(SET_BLOCK) ;GOTO SET BLOCK
) ;_ end of if
(if (= NEWTILE "rb34")
(SET_BLOCK) ;GOTO SET BLOCK
) ;_ end of if
(if (= NEWTILE "rb35")
(SET_BLOCK) ;GOTO SET BLOCK
) ;_ end of if
(if (= NEWTILE "rb36")
(SET_BLOCK) ;GOTO SET BLOCK
) ;_ end of if
(if (= NEWTILE "rb37")
(SET_BLOCK) ;GOTO SET BLOCK
) ;_ end of if
(if (= NEWTILE "rb41")
(SET_BLOCK) ;GOTO SET BLOCK
) ;_ end of if
(if (= NEWTILE "rb42")
(SET_BLOCK) ;GOTO SET BLOCK
) ;_ end of if
(if (= NEWTILE "rb43")
(SET_BLOCK) ;GOTO SET BLOCK
) ;_ end of if
(if (= NEWTILE "rb44")
(SET_BLOCK) ;GOTO SET BLOCK
) ;_ end of if
(if (= NEWTILE "rb45")
(SET_BLOCK) ;GOTO SET BLOCK
) ;_ end of if
(if (= NEWTILE "rb46")
(SET_BLOCK) ;GOTO SET BLOCK
) ;_ end of if
(if (= NEWTILE "rb47")
(SET_BLOCK) ;GOTO SET BLOCK
) ;_ end of if
(if (= NEWTILE "rb48")
(SET_BLOCK) ;GOTO SET BLOCK
) ;_ end of if
(if
(and
(= NEWTILE "rb49")
(= sel "pipe_")
) ;end and
(DRAW_PIPE_SHAPE)
(SET_BLOCK)
) ;_ end of if
) ;end INSERT_BLOCK_VIEW
I can insert any of the fittings or flanges, and draw the selected pipe schedule/size.
(there is a minor issue with the pipe & ucs settings, for later)
However as soon as I repeat the modification for any of the other rb's the code fails
eg
Code: Select all
(if (= NEWTILE "rb46")
(SET_BLOCK) ;GOTO SET BLOCK
) ;_ end of if
(if (= NEWTILE "rb47")
(SET_BLOCK) ;GOTO SET BLOCK
) ;_ end of if
(if
(and
(= NEWTILE "rb48")
(= sel "pipe_")
) ;end and
(DRAW_PIPE_SHAPE)
(SET_BLOCK)
) ;_ end of if
; (if (= NEWTILE "rb48")
; (SET_BLOCK) ;GOTO SET BLOCK
; ) ;_ end of if
(if
(and
(= NEWTILE "rb49")
(= sel "pipe_")
) ;end and
(DRAW_PIPE_SHAPE)
(SET_BLOCK)
) ;_ end of if
) ;end INSERT_BLOCK_VIEW
The failure:
In the first instance after selecting a fitting and selecting 'OK' the block appears on the cursor and can be inserted and the command terminates normally, well as I expect it too!!
In the second case, following the same process, after inserting the block the command does not terminate but waits for a second insertion point for the same block.
While writing this post I tried a third modification, this time to rb47:
Code: Select all
(if (= NEWTILE "rb46")
(SET_BLOCK) ;GOTO SET BLOCK
) ;_ end of if
(if
(and
(= NEWTILE "rb47")
(= sel "pipe_")
) ;end and
(DRAW_PIPE_SHAPE)
(SET_BLOCK)
) ;_ end of if
; (if (= NEWTILE "rb47")
; (SET_BLOCK) ;GOTO SET BLOCK
; ) ;_ end of if
(if
(and
(= NEWTILE "rb48")
(= sel "pipe_")
) ;end and
(DRAW_PIPE_SHAPE)
(SET_BLOCK)
) ;_ end of if
; (if (= NEWTILE "rb48")
; (SET_BLOCK) ;GOTO SET BLOCK
; ) ;_ end of if
(if
(and
(= NEWTILE "rb49")
(= sel "pipe_")
) ;end and
(DRAW_PIPE_SHAPE)
(SET_BLOCK)
) ;_ end of if
) ;end INSERT_BLOCK_VIEW
With this change I now have 3 insertion points before the command terminates normally.
To my untrained/inexperienced eye, it's almost as if the
") ; end of if" is not being recognised??
Tried a forth and yes 4 insertion points.
SteveN.