Glen1980 Posted April 20, 2015 Share Posted April 20, 2015 ^C^C_rectang;\\scale;l;;m2p;$M=$(getvar,lastpoint);\c;0.5; For setting out of lights I need to draw a rectangle then scale it by half so I can position the lights in the corner of the rectangle. I'm gathering with LT and Diesel I can't get the blocks to automagically appear on the rectangle? I've had a go with the macro above to generate my rectangles with a minimum of clicks, it works fine but I was wondering if there was any improvements to be made, i.e. is there a way of getting LT to remember my first click for the first rectangle and replicating it for the mid 2 point section? Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 21, 2015 Share Posted April 21, 2015 Can you do something like copy last scale last .5 using the lastpoint as basepoint. Quote Link to comment Share on other sites More sharing options...
steven-g Posted April 21, 2015 Share Posted April 21, 2015 You need to look at controlling the evaluation sequence of the diesel strings, you're example doesn't look impossible but, it does need you to look into the timing of diesel elements, first thing you really should do is make the variable "macrotrace=1", that will show you what is happening when you run a diesel macro. I'd better say here that I haven't got a working version up and running just some pointers. Take a look at these documents http://www.crlf.de/Dokumente/Diesel/Diesel1.html http://members.iinet.net.au/~bigbyte/diesel.htm To see if you can find some help. It's not straightforward, I am working on a similar thing at the moment, if you get a working solution let me know, and I'll post back when I get something as well (the word is when - not if) Quote Link to comment Share on other sites More sharing options...
Glen1980 Posted April 21, 2015 Author Share Posted April 21, 2015 BIGAL I need to place the centre of the smaller rectangle in the middle of existing one, I have to have to put the first light a quarter of the rooms length/width in from the wall, have half the rooms length width between the 2 rows of lights, this was the easiest way I could think of setting it out, and as there are so many rooms I wanted to simplify it with a macro. In 2016 I think I will have a new osnap for centre of geometry but my 2012 using colleagues won't. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 22, 2015 Share Posted April 22, 2015 Maybe something like rectang m2p scale 0.5 copy L 0,0 0,0 move 200 left, scale L 2.0 move 200 right Quote Link to comment Share on other sites More sharing options...
steven-g Posted April 22, 2015 Share Posted April 22, 2015 Or maybe something like ^C^C^Cid;\setenv;pt1;$M=$(index,0,$(getvar,lastpoint)),$(index,1,$(getvar,lastpoint));"id;\setenv;pt2;$M=$(index,0,$(getvar,lastpoint)),$(index,1,$(getvar,lastpoint))";rec;"""$M=$(getenv,pt1);$(getenv,pt2)""";sc;l;;mtp;"""$M=$(getenv,pt1);$(getenv,pt2)""";c;0.5; I have to be honest it was a lot of guesswork, just shifting quotes around until it suddenly worked. Now if I can just get "cal" to work nicely in there, I'll have my problem sorted as well. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 22, 2015 Share Posted April 22, 2015 Thanks Steven I was trying to remember the setenv bit for storing pts. Sometimes I think its easier to cut and paste ID to a excel then just copy the correct column back with it all worked out. Quote Link to comment Share on other sites More sharing options...
steven-g Posted April 22, 2015 Share Posted April 22, 2015 Bigal, I believe that setenv is the one thing that we LT users have that is actually not available in full Autocad, I use it quite a bit for all sorts of macro's, and indeed using excel is often the easiest method if you are comfortable using it, but it does mean manually switching program environments, which isn't always convienient. Quote Link to comment Share on other sites More sharing options...
Glen1980 Posted April 22, 2015 Author Share Posted April 22, 2015 Steven that is exactly what I wanted! Thanks for the input BIGAL appreciate the time and effort. Quote Link to comment Share on other sites More sharing options...
SEANT Posted April 22, 2015 Share Posted April 22, 2015 . . . . setenv is the one thing that we LT users have that is actually not available in full AutoCAD . . . . That's an odd decision on Autodesk's part. Not that LT users shouldn't have a feature to make their work lives more efficient, more like allowing another potential obstacle to a full AutoCAD upgrade. Quote Link to comment Share on other sites More sharing options...
steven-g Posted April 22, 2015 Share Posted April 22, 2015 That's an odd decision on Autodesk's part. Not that LT users shouldn't have a feature to make their work lives more efficient, more like allowing another potential obstacle to a full AutoCAD upgrade. The only obstacle we have to upgrading to full AutoCad is big, fat, bald and smokes cigars, and they call him Bruce. Quote Link to comment Share on other sites More sharing options...
SEANT Posted April 22, 2015 Share Posted April 22, 2015 The only obstacle we have to upgrading to full AutoCad is big, fat, bald and smokes cigars, and they call him Bruce. I hear you. The lack of a feature would not be the biggest obstacle. 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.