I want to draw a line wich shows a particular colour scheme, I at current do this by drawing a solid line of one colour and then use a dashed line of another colour top go over it.
The obvious problem is that these lines are being double drawn.
Is there a way using lisp that I can draw both lines at once?
Why both of them over eachother ?
Do you mean that there is no space at all between both of them ?
Post a print sceen of your lines shapes .
@Anonymous wrote:I want to draw a line wich shows a particular colour scheme, I at current do this by drawing a solid line of one colour and then use a dashed line of another colour top go over it.
The obvious problem is that these lines are being double drawn.
Is there a way using lisp that I can draw both lines at once?
I sincerely hoping you create entities with Bylyaer properties:
(defun C:MDline () (vl-load-com) (defun *error* (msg) (if (and msg (null (member msg '("Function cancelled" "quit / exit abort"))) ) (princ (strcat "\nError: " msg)) ) (setvar "clayer" cyl) (princ) ) (setq cyl (getvar "clayer")) (setvar 'Clayer "YourFirstLine") (prompt "\nPick points:") (command "_Pline") (while (> (getvar "CMDACTIVE") 0) (command pause)) (vla-put-layer (vla-copy (vlax-ename->vla-object (entlast))) "TheOtherLine" ) (*error* nil) (princ) )
Wherein "YourFirstLine" is the layer for the first line (color/lineweight/linetype)
and "TheOtherLine" is the layer on top of the first line (color/linetype/linewieght)
<untested> codng by memory
HTH
EDIT: got rid of smileys
OK ..... here is another using lines ....
(defun c:Test (/ p1 p2) (if (setq p1 (getpoint "\n First point :")) (while (setq p2 (getpoint p1 "\n Next point :")) (entmake (LIST '(0 . "LINE") (cons 10 p1) (cons 11 p2) (cons 8 (getvar 'clayer)))) (entmake (LIST '(0 . "LINE") (cons 10 p1) (cons 11 p2) (cons 8 "0"))) (setq p1 p2) ) (princ) ) (princ) )
Nice, I know it’s a bit of a wired request, but it’s for electrical schemas (colour coding)
I came up with some new information which was to use my MLSTYLE command and use a solid line of one colour @ and offset of 0 then use a broken line type (hidden or dashed ect) with the second colour also @ and offset of 0 the two lines function as one yet have two colours..
Now just a lisp to create an MLSTYLE and ill great
@Anonymous wrote:Nice, I know it’s a bit of a wired request, but it’s for electrical schemas (colour coding)
@I came up with some new information which was to use my MLSTYLE command and use a solid line of one colour @ and offset of 0 then use a broken line type (hidden or dashed ect) with the second colour also @ and offset of 0 the two lines function as one yet have two colours..
Now just a lisp to create an MLSTYLE and ill great
if he only differences is the color and linetype change the
(command "_PLine") to (command "_Mline") on the code i posted