Jump to content

want to change linetype color manually ..


nila_joy

Recommended Posts

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 ..

Link to comment
Share on other sites

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))))))
           )
       )
   )
)

Link to comment
Share on other sites

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"))

Link to comment
Share on other sites

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 ..

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...