Jump to content

request for change properties all object on screen?


hamidciv

Recommended Posts

hi dear friends

:(i want write one easy code that , after select all object on display, change details using command properties But I did not succeed.

(defun c:test ()

(setq a (ssget "x"))

(command "select" a )

(command "properties")

)

this code not right worked.

please help me

thanks a lot

problem.png

Link to comment
Share on other sites

Try this:

(defun C:test(/ cntr eset en enlist pt clr lay)
 ;Main Application
 ;Turn the command echo off
 (setvar "cmdecho" 0)
 ;Prompt the user for information
 (setq clr(acad_colordlg 1 nil))
 (setq lay(getstring "\n Layer: "))
 ; Get a selection set
 (setq eset
   (ssget
     (list
       (cons -4 "<OR")
         (cons 0 "ARC")
         (cons 0 "ELLIPSE")
         (cons 0 "INSERT")
         (cons 0 "LINE")
         (cons 0 "LWPOLYLINE")
         (cons 0 "MLINE")
         (cons 0 "MTEXT")
         (cons 0 "POLYLINE")
         (cons 0 "TEXT")
         (cons 0 "XLINE")
       (cons -4 "OR>")
     )
   )
 )
 (if (and eset (> (sslength eset) 0))
   (progn 
     ;CHANGE COLOR FOR ALL ENTITIES
     ;Change the color
     (command "change" eset "" "Properties" "Color" clr "")    
     ;
     ;CHANGE LAYER FOR ALL ENTITIES   
     ;Change the layer
     (command "change" eset "" "Properties" "LAyer" lay "")
   )
 )
 (setvar "cmdecho" 1)
 (princ)
)
(princ "\n Type test to run.")
(princ)
;;; ttray33y ;;;

Link to comment
Share on other sites

 (list
       (cons -4 "<OR")
         (cons 0 "ARC")
         (cons 0 "ELLIPSE")
         (cons 0 "INSERT")
         (cons 0 "LINE")
         (cons 0 "LWPOLYLINE")
         (cons 0 "MLINE")
         (cons 0 "MTEXT")
         (cons 0 "POLYLINE")
         (cons 0 "TEXT")
         (cons 0 "XLINE")
       (cons -4 "OR>")
     )

 

@ ttray , This is enough ;)

 

(ssget '(0 . "ARC,ELLIPSE,INSERT,LINE,LWPOLYLINE,MLINE,MTEXT,,POLYLINE,TEXT,XLINE"))

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