Proximo Posted January 19, 2009 Posted January 19, 2009 We currently export DXF files from Pro/ENGINEER to a Burn Table that has it's own custom software. The Burn Table is setup to read only Layer 0. Is there a way we can export a DXF file from Pro/ENGINEER. Open it with our AutoCAD and run a Lisp Routine that will automatically move all lines, text and dimensions to Layer 0? We don't need the current layers deleted, we simply want everything in Layer 0. The Burn Table software is difficult to work with and we do this on a daily basis. Thanks for any input you can provide. -Proximo Quote
Lee Mac Posted January 19, 2009 Posted January 19, 2009 This should do: (defun c:allo (/ ss) (if (setq ss (ssget "X" (list (cons 0 "LINE,TEXT,MTEXT,DIMENSION") (if (getvar "CTAB") (cons 410 (getvar "CTAB")) (cons 67 (- 1 (getvar "TILEMODE"))))))) (command "_CHPROP" ss "" "LA" "0" "") (princ "\n<!> No Entities Found <!>")) (princ)) Quote
Lee Mac Posted January 19, 2009 Posted January 19, 2009 The above will move all: Lines (not polylines) Dimensions M-text D-text to layer 0. - let me know if you need it modified to include other entities. Quote
Proximo Posted January 19, 2009 Author Posted January 19, 2009 Lee, Thank you very much. I will see how this works for us. I am thankful that guys like you are out there. This is all foreign to me. I know Windows Batch Scripting and currently learning Java, but Lisp I have no clue about. Thanks again. Quote
dbroada Posted January 19, 2009 Posted January 19, 2009 however there is no facility to run LISP on a LT version of AutoCAD. I can't remember back to 2002 but can you select everything then click on the layer table drop down on layer 0? This will work on AC2008. Quote
Proximo Posted January 19, 2009 Author Posted January 19, 2009 I just realized that Lisp do not run on LT versions of Autocad. We run version 2002 LT. I will try the method to see what happens. I am sure it will work. I was hoping to have a Lisp that will do this and then maybe further automated it to run batches of drawings/dxf's that need to have everything moved over to Layer 0. Autocad LT does support script files (*.scr), but I am not familiar with this at all. Thanks again for all the help. Quote
VVA Posted January 19, 2009 Posted January 19, 2009 I just realized that Lisp do not run on LT versions of Autocad. LT-Extender ? Quote
Lee Mac Posted January 19, 2009 Posted January 19, 2009 Ahh, sorry about that Proximo - didn't notice that you were running LT... I'll see about a script for ya Quote
Lee Mac Posted January 19, 2009 Posted January 19, 2009 Ok, a script is going to be difficult/impossible for this kind of situation - as, telling it to select certain objects is somewhat difficult. I'd say your best option is to use QSELECT (Express... not sure if LT has express???). And select you various entities like that. Either that, or upgrade Quote
David Bethel Posted January 19, 2009 Posted January 19, 2009 You should be able to change all of the main entities to 0 via a custom menu. [CHPROP - ALL To 0]^c^c^p_.LAYER;_Thaw;*;_On;*;_Unlock;*;_Set;0;;_.CHPROP;_All;;_LAyer;0;;^p It would not change entities nested in INSERTs. -David Quote
Lee Mac Posted January 19, 2009 Posted January 19, 2009 Good idea David, I didn't think of using a macro. Nice one. Quote
David Bethel Posted January 19, 2009 Posted January 19, 2009 And there is also script _.LAyer _Thaw * _On * _Unlock * _Set 0 _.CHPROP _All _LAyer 0 -David CGALL2.SCR Quote
Lee Mac Posted January 19, 2009 Posted January 19, 2009 I initially thought he wanted only lines, text and dimensions - but if he wants all, then yes, that is good. Quote
SeaRR85 Posted February 26, 2009 Posted February 26, 2009 This macro will allow you to move any object to layer zero by selecting the object. When run, Layer 0 color is changed to WHITE (can be changed to any other color too) and then it waits for user to select the object to move to layer 0. ^C^C-layer;s;0;color;WHITE;0;;select si \chprop;p;;la;0;; Quote
ABuckingham Posted February 26, 2009 Posted February 26, 2009 What's wrong with ctrl + a to select all entities in a drawing, then change it to layer 0 in the properties palette? Scripting seems like overkill. Quote
SeaRR85 Posted February 26, 2009 Posted February 26, 2009 I wrote that Macro because I only wanted a select amount of objects moved to layer 0, not everything. I thought it may help. Quote
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.