dkeran Posted November 17, 2015 Share Posted November 17, 2015 I created a macro to speed up a piping process. It has been working fine, though today it is coming back with a different interpretation for '_layer;Set'. Once 'set' is entered it is returning an option for 'setvar'. I am using many LISPS which may be changing system variables that I can't keep a track of. In this part of the macro I want to change the current layer to 0. Would anybody be able to help in pointing me in the direction of what system variable may have changed to have caused this, or possibly edit the macro to enable this process another way? The entire macro is below. Thanks for any help in advance. ^C^C_Laymcur;\_circle;\d;0.125;_sweep;\;mo;so;\_move;\;0,0,0;0,0,-.0625;_layer;Set;0;; Quote Link to comment Share on other sites More sharing options...
steven-g Posted November 17, 2015 Share Posted November 17, 2015 Can you post a copy of the command history, so we can see what happens at each step of the macro, but one point might well be with the 'move' command it appears as though you have an extra space in there, but that could be just a copy/paste error in your post Quote Link to comment Share on other sites More sharing options...
dkeran Posted November 17, 2015 Author Share Posted November 17, 2015 Steven-G, command history below. I've managed to get around it for now swapping out ';_layer;Set;0;; ' for '_clayer;0;;;^C^C', though I wouldn't be happy to leave it at that without knowing the issue behind it. The space in the move command is, as you say, just a copy and paste issue. Command: _Laymcur Select object whose layer will become current: 0 is now the current layer. Command: _circle Specify center point for circle or [3P/2P/Ttr (tan tan radius)]: Specify radius of circle or [Diameter]: d Specify diameter of circle: 0.125 Command: _sweep Current wire frame density: ISOLINES=4, Closed profiles creation mode = Solid Select objects to sweep or [MOde]: 1 found Select objects to sweep or [MOde]: mo Closed profiles creation mode [sOlid/SUrface] : so Select sweep path or [Alignment/Base point/Scale/Twist]: Command: _move Select objects: 1 found Select objects: Specify base point or [Displacement] : 0,0,0 Specify second point or : 0,0,-.0625 Command: _layer Command: Set SETVAR Enter variable name or [?]: 0 Unknown variable name. Type SETVAR ? for a list of variables. Command: SETVAR Enter variable name or [?]: *Cancel* Quote Link to comment Share on other sites More sharing options...
steven-g Posted November 17, 2015 Share Posted November 17, 2015 Strange that the command line isn't giving you the prompt for the options after the _layer command is issued, I can understand that it then goes on and translates 'Set' as a shortcut for the setvar command but why would it ignore the _layer command. OK just a thought what is the value of 'filedia' and just try changing it to 1 or 0 see if that solves the issue (and change it back if it doesn't. Quote Link to comment Share on other sites More sharing options...
dkeran Posted November 17, 2015 Author Share Posted November 17, 2015 Just tried that Stephen, no luck. Filedia was set to 1, changed to 0, tried the macro and same issue. It's odd alright. And I can't remember which LISPs I was using that may have changed a variable, especially one that wouldn't have changed it back. Quote Link to comment Share on other sites More sharing options...
steven-g Posted November 17, 2015 Share Posted November 17, 2015 I can get the macro to go to the setvar command, but only by adding a second ';' after the '_layer' command in the macro, just check your macro carefully again that there are no errors in there (I doubt it, but I can't think of anything else)? what happens if you shorten the macro to ^C^C_Laymcur;\_circle;\d;0.125;_sweep;\;mo;so;\_move;\;0,0,0;0,0,-.0625;_layer; does the layer command start then. Quote Link to comment Share on other sites More sharing options...
steven-g Posted November 17, 2015 Share Posted November 17, 2015 OK grasping at straws here does this work ^C^C_Laymcur;\_circle;\d;0.125;_sweep;\;mo;so;\_move;\;0,0,0;0,0,-.0625;.layer;Set;0;; note the period '.' in front of the layer command Quote Link to comment Share on other sites More sharing options...
dkeran Posted November 17, 2015 Author Share Posted November 17, 2015 Neither of them seem to work Stephen. The first suggestion works and enters into layers. The second gives the same responce as the original. Sure not to worry, I've got it working through using '_clayer;0;;;^C^C' so not the end of the world. Thanks very much for the help though, much appreciated. Quote Link to comment Share on other sites More sharing options...
ReMark Posted November 17, 2015 Share Posted November 17, 2015 Wouldn't it have to be -layer;S; not _layer;Set? Quote Link to comment Share on other sites More sharing options...
steven-g Posted November 17, 2015 Share Posted November 17, 2015 The _layer;Set works fine for me, but then I am in Belgium, though as far as I know we use the normal English version of the program anyway. But either versiojn works when used in a macro (at least it does here), it could possibly cause issues on the OP's system. Quote Link to comment Share on other sites More sharing options...
dkeran Posted November 17, 2015 Author Share Posted November 17, 2015 Mark, no good either unfortunately. Tried change to 'S' rather than 'Set', still the same issue. Quote Link to comment Share on other sites More sharing options...
ReMark Posted November 17, 2015 Share Posted November 17, 2015 In the course of troubleshooting the problem did you close AutoCAD entirely then reopen it? Did you use any custom lisp routines prior to trying to execute the macro? Quote Link to comment Share on other sites More sharing options...
dkeran Posted November 17, 2015 Author Share Posted November 17, 2015 Mark, I tried the standard IT turn it off and on again, no good. I up to about 12 LISPs in any one day so can't keep a track of what I used most recently. I shouldnt have a LISP which changes and variable and not change it back though. Quote Link to comment Share on other sites More sharing options...
ReMark Posted November 17, 2015 Share Posted November 17, 2015 No, you shouldn't but sometimes in our haste to solve one problem we inadvertently create another. Are these lisp routines you have used in the past on a daily basis? Quote Link to comment Share on other sites More sharing options...
dkeran Posted November 17, 2015 Author Share Posted November 17, 2015 I'd use them daily, could have used 10/12 of them before I noticed the macro issue. Though I've used all these functions for the previous few weeks with no issues. Quote Link to comment Share on other sites More sharing options...
ReMark Posted November 17, 2015 Share Posted November 17, 2015 Did you try the macro in a new drawing? Quote Link to comment Share on other sites More sharing options...
dkeran Posted November 17, 2015 Author Share Posted November 17, 2015 I did, no luck either. I've gone and broken AutoCAD... Quote Link to comment Share on other sites More sharing options...
ReMark Posted November 17, 2015 Share Posted November 17, 2015 Seems odd. I'm sure steven-g will come up with a solution. He's good at those kinds of problems. Quote Link to comment Share on other sites More sharing options...
steven-g Posted November 17, 2015 Share Posted November 17, 2015 Very odd I'm at a loss, only thing I would suggest is go back to the shortened macro in post 6, and just keep adding to it one letter and character at a time and see where it breaks down again, that might give a clue. Or working backwards does ^C^C_layer;Set;0;; work Quote Link to comment Share on other sites More sharing options...
dkeran Posted November 18, 2015 Author Share Posted November 18, 2015 Morning folks, I've another issue I've just discovered which may be linked to the macro issue. The process of copy and paste with base point, open an xref, etc that I have working from right clicking, their process is messed up a bit. I select information I want to copy, right click, select copy with basepoint, enter basepoint co ords, then it asks me again to select objects. After I select the objects again it does copy them and pasting isn't a problem. Though it is the same with opening an xref, when I select the xref, right click, open xref, it again asks me to select the xref. Would anyone know if this is a variable problem? I've had this is the past but didn't link it to the macro issue. My solution in the past was to reset my AutoCAD to original settings which was a nuisane. 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.