nila_joy Posted May 14, 2012 Share Posted May 14, 2012 Hi guys.. I AM BACK .. I want to change all linetype color manually for printing purpose . Means I want to change all the hidden line of a drawing in red, all continuous in brown ..like this. Now the problem is .. 1. The code for the linetype is 6 , but whenever the line type is dedicated for a layer, the code 6 is not showing, then how I'll get all the hidden line types (may be in different layers) of a drawing .. 2. From table search I can get all the line type available in the drawing, but all those line types are in used? I am in doubt .. I failed to find them visually in my drawing .. 3. I can get the layer name from DXF code 8 , but how can I get the details of the layer, like color, line type etc .. Plz help guys ... Subho.. KOlkata.. India .. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 14, 2012 Share Posted May 14, 2012 Maybe you can learn from this example: (defun c:getlinetype ( / dxfdata entity ) (if (setq entity (car (entsel))) (progn (setq dxfdata (entget entity)) (cond ( (cdr (assoc 6 dxfdata))) ( (cdr (assoc 6 (tblsearch "LAYER" (cdr (assoc 8 dxfdata)))))) ) ) ) ) Quote Link to comment Share on other sites More sharing options...
nila_joy Posted May 14, 2012 Author Share Posted May 14, 2012 Thnx lee.. thnx a lot .. waiting for others reply ... Quote Link to comment Share on other sites More sharing options...
Tharwat Posted May 14, 2012 Share Posted May 14, 2012 Can you please explain what you looking for straight to the point ? Quote Link to comment Share on other sites More sharing options...
MSasu Posted May 14, 2012 Share Posted May 14, 2012 2. From table search I can get all the line type available in the drawing, but all those line types are in used? I am in doubt .. I failed to find them visually in my drawing .. There can be 3 cases: 1. Linetypes attached directly to entities: (ssget "_X" '((6 . "DOT"))) 2. Linetypes attached by layers - need to check which layers have a linetype other than Continuous; check if those layers are empty or not: (ssget "_X" (list (cons 8 LayerWithDottedLine))) 3. Linetypes attached directly to entities inside blocks, a little harder to parse. This is for programmatically approach; to visually inspect this just call the PURGE command and check if there are linetypes proposed for remove. 3. I can get the layer name from DXF code 8 , but how can I get the details of the layer, like color, line type etc .. To see layer's properties check his record using TBLSEARCH: (entget (tblsearch "LAYER" "0")) Quote Link to comment Share on other sites More sharing options...
nila_joy Posted May 14, 2012 Author Share Posted May 14, 2012 ok, let me explain plainly .. I want to change the colors of the lines of a drawing for printing purpose .. I am writing a program in which all the line types of the drawing will be shown as a list (using DCL) in the left side, and in the right side color box will be shown (already made it by using image DCL) .. user will select one line type from left (like hidden) , assign a color from right (like red) .. and all the hidden lines of the drawing (may be not in same layer ) will be change into red. hope I explained what exactly I want to do .. Subho.. Kolkata.. India .. Quote Link to comment Share on other sites More sharing options...
MSasu Posted May 14, 2012 Share Posted May 14, 2012 Above you have most of the information to list entities by their linetype. To change the color, check the SUBST and ENTMOD functions too. The color is stored under DXF code 62, except when is attached per container layer and this code isn’t available. You will have to treat those cases differently. I suggest you to start to design the part to gather entities by their linetype and post your attempt here for debug. 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.