jafooli Posted April 24, 2012 Share Posted April 24, 2012 hi guys, im using autocad 2004LT is there a script which can flatten? Quote Link to comment Share on other sites More sharing options...
SLW210 Posted April 24, 2012 Share Posted April 24, 2012 Here is a Macro for a button. You could probably follow that and make a script or just set up a button. ^C^C_UCS;;_move _all;;0,0,1e99;;_move _all;;0,0,-1e99;;_chprop;_all;;_thickness;0;;^M; Quote Link to comment Share on other sites More sharing options...
ReMark Posted April 24, 2012 Share Posted April 24, 2012 You could also try using the CHANGE command with the ELEVATION option, as a macro, to affect the same results. Quote Link to comment Share on other sites More sharing options...
SLW210 Posted April 24, 2012 Share Posted April 24, 2012 You could also try using the CHANGE command with the ELEVATION option, as a macro, to affect the same results. All points on the object must have the SAME Z value for Change>Elevation to work. Quote Link to comment Share on other sites More sharing options...
Dadgad Posted April 24, 2012 Share Posted April 24, 2012 You could create an .SCR file which you can run in LT. http://www.lukewarmcoffee.com/cad/AUGI%20-%20Passionate%20Scripting%20for%20Everyone.pdf Quote Link to comment Share on other sites More sharing options...
jafooli Posted April 24, 2012 Author Share Posted April 24, 2012 (edited) ok thanks guys... when i copy and paste ^C^C_UCS;;_move _all;;0,0,1e99;;_move _all;;0,0,-1e99;;_chprop;_all;;_thickness;0;;^M; into the command box is says Command: ^C^C_UCS;;_move Unknown command "^C^C_UCS;;_MOVE". Press F1 for help. Command: _all;;0,0,1e99;;_move Unknown command "ALL;;0,0,1E99;;_MOVE". Press F1 for help. am I doing something wrong?? Edited May 8, 2012 by SLW210 Quote Link to comment Share on other sites More sharing options...
SLW210 Posted April 24, 2012 Share Posted April 24, 2012 It needs to be placed in a button Macro to work. Quote Link to comment Share on other sites More sharing options...
jafooli Posted April 24, 2012 Author Share Posted April 24, 2012 ok so can you point me in the right place to do such thing please if you wouldn't mind Quote Link to comment Share on other sites More sharing options...
ReMark Posted April 24, 2012 Share Posted April 24, 2012 Put on your thinking cap there SLW. Jafooli is using 2004. You remember back that far? You was just a youngin' then weren't ya? LoL Quote Link to comment Share on other sites More sharing options...
SLW210 Posted April 24, 2012 Share Posted April 24, 2012 See if THIS helps. Quote Link to comment Share on other sites More sharing options...
ReMark Posted April 24, 2012 Share Posted April 24, 2012 You are too good man! Quote Link to comment Share on other sites More sharing options...
jafooli Posted April 25, 2012 Author Share Posted April 25, 2012 ok thanks guys, ive figured out how to make a macro button but once I set it all up and execute the button it does not do any thing apart from change property. what im trying to do is change a 3d polyline into a polyline, as autocad 2004LT does not have express tools I cannot use the Flatten function. So I was looking into finding if its possible a script to do such a thing? Is it possible? Quote Link to comment Share on other sites More sharing options...
eldon Posted April 25, 2012 Share Posted April 25, 2012 Something must be wrong with your macro. I have just tried the same procedure manually with 2002, and it flattened a 3D polyline Quote Link to comment Share on other sites More sharing options...
jafooli Posted April 25, 2012 Author Share Posted April 25, 2012 right ok urm dont know whats wrong then, when I apply the macro I get in the command - Enter property to change [Color/LAyer/LType/ltScale/LWeight/Thickness]: _thickness Specify new thickness : 0 Enter property to change [Color/LAyer/LType/ltScale/LWeight/Thickness]: Cannot change thickness for 3D Polylines. Cannot change thickness for BLOCKs. Command: CHPROP Select objects: I click on object which is a 3d polyline then I get in command - CHPROP 1 found Enter property to change [Color/LAyer/LType/ltScale/LWeight/Thickness]: now what do I do to change the 3d poly to a polyline?? Quote Link to comment Share on other sites More sharing options...
jafooli Posted April 25, 2012 Author Share Posted April 25, 2012 will this help? new block.dwg Quote Link to comment Share on other sites More sharing options...
eldon Posted April 25, 2012 Share Posted April 25, 2012 I use only the Move part of the proposed Macro. I already have my UCS in World, and do not need to change properties afterwards. This is a copy of my command line: Command: m MOVE Select objects: all 1 found Select objects: Specify base point or displacement:(I just pick a point anywhere on the screen) Specify second point of displacement or : @0,0,1e99 Command: m MOVE Select objects: p 1 found Select objects: Specify base point or displacement:(I just pick a point anywhere on the screen) Specify second point of displacement or : @0,0,-1e99 Your posted drawing was already all at zero, but this procedure does not work with 3D blocks. It works because you are taking AutoCAD's coordinates far out of the forseen accuracy, so by giving the z value an enormous value, AutoCAD gives up and sets the z values all the same. So when you reverse the move, then all z coordinates become zero. However, 3D blocks remember the differential z values and preserve those on the second move. Quote Link to comment Share on other sites More sharing options...
ReMark Posted April 25, 2012 Share Posted April 25, 2012 I experimented with your new block.dwg and was able to create a polyline just by first exploding the object (into 1466 line segments) then recombining them using the PEDIT command and JOIN option. Quote Link to comment Share on other sites More sharing options...
Dadgad Posted April 25, 2012 Share Posted April 25, 2012 I was thinking of exploding too, and going that route, but didn't you have to zero out the z start and end points before you used PEDIT? Quote Link to comment Share on other sites More sharing options...
SLW210 Posted April 25, 2012 Share Posted April 25, 2012 You never mentioned you wanted to change a 3D Polyline to a 2D polyline. Flatten will not do that either. Being on LT you will need to use ReMarks method. Quote Link to comment Share on other sites More sharing options...
ReMark Posted April 25, 2012 Share Posted April 25, 2012 No I did not (I think the OP did that already). I used magic. Presto...Chango...Done. 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.