Jump to content

POLILINES WIDTH


jim78b

Recommended Posts

7 hours ago, mhupp said:

So update lido's code.

 

;;Changing the width of the polylines to zero if the
;;thickness of the polylines is less than zero
(DEFUN C:POLY0 (/ ACDC SEL)
  (ssget "_X" '((0 . "*POLYLINE") (-4 . "<=") (39 . 0.1))) ;only select polylines that have widths less than or equal to 0.1
  (setq ACDC (vla-get-activedocument (vlax-get-acad-object)) SEL (vla-get-activeselectionset ACDC))
  (vlax-for Itm SEL 
    (vla-put-constantwidth Itm 0)
  )
  (princ)
) ;;C:POLY0

 

Ok i will try thanks a lot .i hope work with blocks and not.

Link to comment
Share on other sites

The problem in autoca is when you have polylines global  width on 0.1 /0.001 / 0.0001 .if you select a block with this polylines you don't see the highlight color ...or if you try to move the you don't see anything. 

Link to comment
Share on other sites

11 hours ago, jim78b said:

Constant width 

Maybe this?

(defun c:foo nil
  (vlax-for b (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object)))
    (if	(= 0 (vlax-get b 'isxref))
      (vlax-for	a b
	(and (vlax-write-enabled-p a)
	     (vlax-property-available-p a 'constantwidth)
	     (<= (vla-get-constantwidth a) 0.1)
	     (vla-put-constantwidth a 0)
	)
      )
    )
  )
  (princ)
)

 

  • Like 1
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...