In the attached lisp file I am trying to load and run the IB routine, but can't seem to get it to work.
Any help would be appreciated.
Thanks Mike
|
In the attached lisp file I am trying to load and run the IB routine, but can't seem to get it to work.
Any help would be appreciated.
Thanks Mike
I'm no expert... but just looking at this right quick I would say replaceCode:(DEFUN C:MONO33() (COMMAND "UNDO" "M" ) (command "expert" "2") (command "psetupin" "c:/wilson/proto/newnewproto-mono.dwt" "*") (command "expert" "0") (COMMAND "PSLTSCALE" "1" ) (COMMAND "LTSCALE" 0.33 ) (COMMAND "IMAGEFRAME" "0" ) (COMMAND "LAYER" "ON" "*" "") (COMMAND "LAYER" "S" "4" "OFF" "4,*|4,99,*|99,*MIKE*,98,*|98,*ATT*,*|*ATT*,1000,*|1000,VPORT" "Y" "") (command "tilemode" "0") ;(COMMAND "UCS" "W") (load "IB.lsp") (COMMAND "mspace") (COMMAND "c:IB") (COMMAND "pspace") (initdia) (command "_plot") ;(COMMAND "UNDO" "B" ) (princ) )
withCode:(COMMAND "c:IB")
I think I've only seen the c: during a defun statment. I.E (DEFUN C:MONO33()...Code:(COMMAND "IB")
The command that you run is then MONO33, not c:MONO33.
Put theas early as you can in the routine, it may choke if it's to close to the function call especially if the file is big. IfCode:(load "IB.lsp")is the function in the routine then the call is correct. If that doesn't do it you may need to attach IB.lsp as well.Code:(defun c:IB ()
For setting system variables I'd userather thanCode:(setvar 'PSLTSCALE 1).Code:(COMMAND "PSLTSCALE" "1" )
Also, replace (COMMAND "c:IB") with (c:IB)
Attached is the MONO33.lsp Revised, and the IB.lsp.
What I am trying to do is push the image to the back, before plotting.
Thanks Mike
Try:IB.LSP looks ok.Code:(DEFUN C:MONO33(/ *ERROR* expert PSLTSCALE LTSCALE IMAGEFRAME tilemode) (load "IB.lsp") (defun *ERROR* (s) ; If an error (such as CTRL-C) occurs ; while this command is active... (if (/= s "Function cancelled") (princ (strcat "\nError: " s)) ) (setvar 'expert expert) (setvar 'PSLTSCALE PSLTSCALE) (setvar 'LTSCALE LTSCALE) (setvar 'IMAGEFRAME IMAGEFRAME) (setvar 'tilemode tilemode) (princ) ) (vl-cmdf "undo" "Mark") (setvar 'expert 2) (command "psetupin" "c:/wilson/proto/newnewproto-mono.dwt" "*") (setq expert (getvar 'expert) PSLTSCALE (getvar 'PSLTSCALE) LTSCALE (getvar 'LTSCALE) IMAGEFRAME (getvar 'IMAGEFRAME) tilemode (getvar 'tilemode) ) (setvar 'expert 1) (setvar 'PSLTSCALE 1 ) (setvar 'LTSCALE 0.33) (setvar 'IMAGEFRAME 0) ; (vl-cmdf "LAYER" "ON" "*" "S" "4" "OFF" "4,*|4,99,*|99,*MIKE*,98,*|98,*ATT*,*|*ATT*,1000,*|1000,VPORT" "Y" "") (vl-cmdf "LAYER" "ON" "*" "S" "4" "OFF" "4,*|4,99,*|99,*MIKE*,98,*|98,*ATT*,*|*ATT*,1000,*|1000,VPORT" "") ; removed "Y" (setvar 'tilemode 0); puts you on Model Tab ;(COMMAND "mspace") ** Command not allowed in Model Tab ** (c:IB) (vl-cmdf "pspace") (initdia) (vl-cmdf "_plot") (setvar 'expert expert) (setvar 'PSLTSCALE PSLTSCALE) (setvar 'LTSCALE LTSCALE) (setvar 'IMAGEFRAME IMAGEFRAME) (setvar 'tilemode tilemode) (princ) )
Last edited by Tom Beauford; 2013-07-25 at 03:11 PM. Reason: removed "Y" option from Layer command sequence
here is part of the dialogue,
Warning: layer "TABTEXT" is frozen. Will not display until thawed.
Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/TRansparency/MATerial/Plot/PStyle/Freeze/Thaw/LOck/Unlock/stAte/Description/rEconcile]: S
Enter layer name to make current or <select object>: 4 Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/TRansparency/MATerial/Plot/PStyle/Freeze/Thaw/LOck/Unlock/stAte/Description/rEconcile]: OFF
Enter name list of layer(s) to turn off or <select objects>: 4,*|4,99,*|99,*MIKE*,98,*|98,*ATT*,*|*ATT*,1000,*|1000,VPORT Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/TRansparency/MATerial/Plot/PStyle/Freeze/Thaw/LOck/Unlock/stAte/Description/rEconcile]: Y
Invalid option keyword.
Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/TRansparency/MATerial/Plot/PStyle/Freeze/Thaw/LOck/Unlock/stAte/Description/rEconcile]:
Command: Unknown command "BACK". Press F1 for help.
pspace
Already in paper space.
Command: _plot Regenerating layout.
Regenerating model.
it seem to not like the back command