Results 1 to 8 of 8

Thread: Dashed and Dot to Hidden

  1. #1
    100 Club
    Join Date
    2007-02
    Location
    Porto
    Posts
    107
    Login to Give a bone
    0

    Default Dashed and Dot to Hidden

    Hi guys,
    Could someone tell me, if it's possible (with a lisp code) to change Dot and Dashed linetype to Hidden?
    Thanks,

  2. #2
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: Dashed and Dot to Hidden

    Do you want to change the linetype of layers or of entities or of both?
    R.K. McSwain | CAD Panacea |

  3. #3
    100 Club
    Join Date
    2007-02
    Location
    Porto
    Posts
    107
    Login to Give a bone
    0

    Default Re: Dashed and Dot to Hidden

    Quote Originally Posted by rkmcswain View Post
    Do you want to change the linetype of layers or of entities or of both?
    Some drawings have layers with other linetypes and have objects too. I think the best solution would be to change the layers, or the objects, so that there would be just the sort of hidden linetype.

  4. #4
    Certifiable AUGI Addict tedg's Avatar
    Join Date
    2005-06
    Location
    in the upper right corner
    Posts
    3,508
    Login to Give a bone
    0

    Default Re: Dashed and Dot to Hidden

    Quote Originally Posted by pt_zooropa View Post
    Some drawings have layers with other linetypes and have objects too. I think the best solution would be to change the layers, or the objects, so that there would be just the sort of hidden linetype.
    Well here's a quick, crude stab at what a routine may look like.
    Code:
    (defun c:hidlt ()
        (command "-layer" "ltype" "hidden" "test" "") ;; changes the linetype to hidden on "test" layer
        (command "_chprop" "all" "" "ltype" "bylayer" "") ;;changes all entites' linetype to ByLayer
    (princ)    
    )
    There's probably a better way, but it's a start.
    Good luck...
    Last edited by tedg; 2008-07-14 at 07:46 PM. Reason: Fixed CODE TAGS, accidently re posted (doh)

  5. #5
    100 Club
    Join Date
    2007-02
    Location
    Porto
    Posts
    107
    Login to Give a bone
    0

    Default Re: Dashed and Dot to Hidden

    Ok. I dont want to change entities to Bylayer, only change all entities of drawing to specific Layer and keep linetypes. Only Dot and Dashed must change to Hidden.
    Thanks.

  6. #6
    I could stop if I wanted to
    Join Date
    2007-08
    Posts
    202
    Login to Give a bone
    0

    Default Re: Dashed and Dot to Hidden

    Hi,

    Try this:

    Code:
    (vl_load_com)
    (vlax-for blk (vla-get-Blocks
    		(vla-get-ActiveDocument (vlax-get-acad-object))
    	      )
      (vlax-for obj	blk
        (if	(and (vlax-property-available-p obj 'LineType T)
    	     (member (vla-get-Linetype obj) '("DOT" "DASHED"))
    	)
          (vla-put-lineType obj "HIDDEN")
        )
      )
    )
    Last edited by 'gile'; 2008-07-16 at 12:20 AM. Reason: added (vl_load-com)

  7. #7
    100 Club
    Join Date
    2007-02
    Location
    Porto
    Posts
    107
    Login to Give a bone
    0

    Default Re: Dashed and Dot to Hidden

    Thanks for your help!
    But it returns error:
    "no function definition: VLAX-GET-ACAD-OBJECT; error: An
    error has occurred inside the *error* functionAutoCAD variable setting
    rejected: "blipmode" nil"

  8. #8
    I could stop if I wanted to
    Join Date
    2007-08
    Posts
    202
    Login to Give a bone
    0

    Default Re: Dashed and Dot to Hidden

    Sorry,
    no function definition: VLAX-GET-ACAD-OBJECT
    You got this message because I forgot to add a (vl-load-com) at the begining.
    This expression is needed to load the vlax functions. You can add it to your startup suite so that the vlax functions should be automaticaly loaded.

    ; error: An
    error has occurred inside the *error* functionAutoCAD variable setting
    rejected: "blipmode" nil
    This message means that the *error* function haven't be reset to the built in one in another routine which redefine it (restting blipmode sysvar).

Similar Threads

  1. Hidden or dashed Linetype
    By Ehsan in forum 3ds Max - General
    Replies: 4
    Last Post: 2012-04-28, 05:33 AM
  2. Hidden dashed line not showing up in paperspace
    By Suzyq8284 in forum AutoCAD General
    Replies: 2
    Last Post: 2009-03-04, 08:46 PM
  3. Batt Insulation as a Hidden (Dashed) Linetype
    By raddis in forum Revit Architecture - General
    Replies: 6
    Last Post: 2006-08-17, 06:06 PM
  4. Dashed (Hidden) Lines in Family Editor
    By gordgraff in forum Revit Architecture - Families
    Replies: 3
    Last Post: 2005-04-22, 02:13 AM
  5. Hidden and Dashed Lines
    By stathamwoodwork66052 in forum ACA General
    Replies: 2
    Last Post: 2004-07-07, 02:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •