Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Distinguished Contributor
msarqui
Posts: 135
Registered: ‎09-14-2010
Message 1 of 4 (179 Views)
Accepted Solution

Selection set

179 Views, 3 Replies
02-10-2013 05:06 PM

This is a easy one...I hope

 

I am trying to select all (if it exists) rectangles in the layer Tx-Viewport an change it's global width to 50. But I only get this: ; error: bad SSGET list

 

(defun c:RectWidth ( / ss)
(if (setq ss (ssget "_X" '((0. LWPLYLINE)(8 . "Tx-Viewport"))))
(command "._pedit" ss "w" "50" ""))
(princ)
)

 

What is wrong?

 

Thanks


msarqui wrote:

This is a easy one...I hope

 

I am trying to select all (if it exists) rectangles in the layer Tx-Viewport an change it's global width to 50. But I only get this: ; error: bad SSGET list

 

(defun c:RectWidth ( / ss)
(if (setq ss (ssget "_X" '((0. LWPLYLINE)(8 . "Tx-Viewport"))))
(command "._pedit" ss "w" "50" ""))
(princ)
)

 

What is wrong?

 

Thanks


 

(defun c:RectWidth (/ ss)
(if (setq ss (ssget "_X" '((0 . "LWPOLYLINE") (8 . "Tx-Viewport"))))
(command "._pedit" "_m" ss "" "w" "50" ""))
(princ))

 

HTH

 

 

*Expert Elite*
pbejse
Posts: 2,500
Registered: ‎11-24-2009
Message 2 of 4 (169 Views)

Re: Selection set

02-10-2013 06:37 PM in reply to: msarqui

msarqui wrote:

This is a easy one...I hope

 

I am trying to select all (if it exists) rectangles in the layer Tx-Viewport an change it's global width to 50. But I only get this: ; error: bad SSGET list

 

(defun c:RectWidth ( / ss)
(if (setq ss (ssget "_X" '((0. LWPLYLINE)(8 . "Tx-Viewport"))))
(command "._pedit" ss "w" "50" ""))
(princ)
)

 

What is wrong?

 

Thanks


 

(defun c:RectWidth (/ ss)
(if (setq ss (ssget "_X" '((0 . "LWPOLYLINE") (8 . "Tx-Viewport"))))
(command "._pedit" "_m" ss "" "w" "50" ""))
(princ))

 

HTH

 

 

Distinguished Contributor
msarqui
Posts: 135
Registered: ‎09-14-2010
Message 3 of 4 (149 Views)

Re: Selection set

02-11-2013 05:23 AM in reply to: pbejse

Thanks pbejse

 

I really need to be more attentive to the details.

It's perfect now.

 

Regards

*Expert Elite*
pbejse
Posts: 2,500
Registered: ‎11-24-2009
Message 4 of 4 (135 Views)

Re: Selection set

02-11-2013 10:37 PM in reply to: msarqui

msarqui wrote:

Thanks pbejse

 

I really need to be more attentive to the details.

It's perfect now.

 

Regards


You are welcome, thats what make us human after all,

 

Keep on coding msarqu.

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.