dblclkmatt Posted July 21, 2017 Author Share Posted July 21, 2017 (defun c:BLK () (setq PT (getpoint "Insertion point ??? ")) (setq ATT1 (strcat "PART_NAME=" (setq *shp* ( (lambda ( input ) (if (eq "" input) *shp* input)) (getstring (strcat "\nShop Order ??? <" (setq *shp* (cond (*shp* ) ( "41000" ))) "> : ")) ) ) "-" (getstring "\nItem Number ??? ") )) (setq ATT2 (strcat "MATERIAL=" (setq *mtrl* ( (lambda ( input ) (if (eq "" input) *mtrl* input)) (getstring (strcat "\nMaterial ??? <" (setq *mtrl* (cond (*mtrl* ) ( "A36" ))) "> : ")) ) ) )) (setq ATT3 (strcat "THICKNESS=" (setq *thck* ( (lambda ( input ) (if (eq "" input) *thck* input)) (getstring (strcat "\nThickness ??? <" (setq *thck* (cond (*thck* ) ( "1.00" ))) "> : ")) ) ) )) (setq ATT4 (strcat "QUANTITY=" (setq *qty* ( (lambda ( input ) (if (eq "" input) *qty* input)) (getstring (strcat "\nQuantity ??? <" (setq *qty* (cond (*qty* ) ( "1" ))) "> : ")) ) ) )) (setq ATT5 (strcat "REMARKS=" (getstring "Remarks ??? "))) (command "-insert" "part_block" PT 1.0 1.0 0 ATT1 ATT2 ATT3 ATT4 ATT5) (princ) ) So this lsp has been serving me well in conjunction with the "part_block.dwg" since 2014. However, I recently upgraded my machine while keeping the same AutoCAD. Somehow this no longer works. The prompts come up just like normal, but after the last prompt it inserts the block as if I hadn't answered the prompts at all, opens the attributes dialog box for the "part_block.dwg" and after I hit "OK" it displays this on the command console. Command: BLK Insertion point ??? Shop Order ??? <41000> : 67975 Item Number ??? 01 Material ??? <A36> : Thickness ??? <1.0> : 1.25 Quantity ??? <1> : 4 Remarks ??? NO-KERF Unknown command "PART_NAME=67975-01". Press F1 for help. Unknown command "MATERIAL=A36". Press F1 for help. Unknown command "25". Press F1 for help. Unknown command "QUANTITY=4". Press F1 for help. Unknown command "REMARKS=NO-KERF". Press F1 for help. Anyone have anything thoughts? I'm so used to using this method it's messing up my workflow. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 22, 2017 Share Posted July 22, 2017 I had this problem also but easy fix (setvar "attdia" 0) Quote Link to comment Share on other sites More sharing options...
dblclkmatt Posted July 24, 2017 Author Share Posted July 24, 2017 I had this problem also but easy fix (setvar "attdia" 0) Awesome! Worked like a charm! Thanks BIGAL! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.