ausswonder Posted June 2, 2016 Share Posted June 2, 2016 hi all, we are facing some standards and automation consistency problems. we have our C3D files with 6 design options all with standard layer names with a suffix "Option A", "Option B" etc we export these files to AutoCAD for the shared references for the rest of the disciplines on the project to use. what we are needing is to change the model layers with the options suffix back to a standard name. is there a lisp or way to automate the change or conversion of the layers without too much manual interaction and time investment. Cheers A Quote Link to comment Share on other sites More sharing options...
RobDraw Posted June 2, 2016 Share Posted June 2, 2016 The rename tool can utilize wild cards and layer merge will combine layers. That should do the the trick for you, if I understand correctly. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted June 3, 2016 Share Posted June 3, 2016 I do the opposite we have a look up text file that has the layer name in it prefered colour linetype etc this was the easiest way to change field surveys from various sources, it adds to the layer name EX_EDGE_ROAD SU_Water. Robdraw is on the money using rename it can be programmed via script or lisp etc. Only hiccup is the * is not supported in simple -rename layer EX* OLD* Lee may know a way, else do a search layer table look at 1st 2 for "EX" then rename. ; simple example to start with (setq layer (vla-get-layers (vla-get-activedocument (vlax-get-acad-object)))) (vlax-for each layer (setq layname (vla-get-name each)) ; here is where you would check for layer name 1st characters ; (if (= (substr layname 1 2) "EX" ) ;(vla-put-name each "newname") ; chop the EX from the front ) 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.