Jump to content

How to create a list of Layers just have maded from previously to dynamic input ?


Recommended Posts

Posted (edited)

I have a vlisp routine that I might got from Mr. Lee Mac I will attach the file what I mean to here on the below of this post. But in firstly How to make whole of layers have just created by me will automate input to the list that I purpose when I called them back to the dynamic input with using this vlisp routine as a defun as LYLI... Here it is the code for example and an image to let be clearly;

 

 

 


(defun c:[color=red][b]LYLI[/b][/color] ( / layers layer ss )
 (setq layers '("0" "Defpoints" "Window.In" "Wood.In.Ou" "Glass.In.Ou" "List.In.Ou" "Deck.In.Ou.Sr" "Base.In.Ou.Sr" "Ground.In.Ou.Sr" "Plat.Mc.El.Sr" "Bolt.Mc" "Block.Sh" "Section.Sh" "Partition.In.Sr" "Elbow.Mc.Pp" "Pipe.Pp" "Bricks.Sr" "Cement.Sr" "Plaster.Sr" "Roof.Ou.Sr" "Weld.Sh" "Part.In.Mc.El.Sr.As" "Piece.In.Mc.El.Sr.Sb" "Path.In.Mc.El.Sr.Ar.As.Sb" "Xline-R.Sh" "Xpoint.Sh" "Dimension.Dm" "Shadow.Sh" "Beam.Sr" "Column.Sr" "NeastingCut.Sr" "Plastic.Sr" "Steel.Sr" "Iron.Sr" "Rubber.Sr" "Fibber.Sr" "Annotation.Tx" "Texts.Tx" "Mtext.Tx" "Line.Sh" "Strip.Sh" "Dash.Sh" "Dot2x.Sh" "Connecting.Sh" "Arrow.Sh" "Breakline.Sh" "GeneralARM.Ga" "Assembly.As" "Sub.Assembly.Sb"))

 (initget 1 "0 Defpoints Window.In Wood.In.Ou Glass.In.Ou List.In.Ou Deck.In.Ou.Sr Base.In.Ou.Sr Ground.In.Ou.Sr Plat.Mc.El.Sr Bolt.Mc Block.Sh Section.Sh Partition.In.Sr Elbow.Mc.Pp Pipe.Pp Bricks.Sr Cement.Sr Plaster.Sr Roof.Ou.Sr Weld.Sh Part.In.Mc.El.Sr.As Piece.In.Mc.El.Sr.Sb Path.In.Mc.El.Sr.Ar.As.Sb Xline-R.Sh Xpoint.Sh Dimension.Dm Shadow.Sh Beam.Sr Column.Sr NeastingCut.Sr Plastic.Sr Steel.Sr Iron.Sr Rubber.Sr Fibber.Sr Annotation.Tx Texts.Tx Mtext.Tx Line.Sh Strip.Sh Dash.Sh Dot2x.Sh Connecting.Sh Arrow.Sh Breakline.Sh GeneralARM.Ga Assembly.As Sub.Assembly.Sb")

 (setq layer (getkword "\nChoose Target Layer [0/Defpoints/Window.In/Wood.In.Ou/Glass.In.Ou/List.In.Ou/Deck.In.Ou.Sr/Base.In.Ou.Sr/Ground.In.Ou.Sr/Plat.Mc.El.Sr/Bolt.Mc/Block.Sh/Section.Sh/Partition.In.Sr/Elbow.Mc.Pp/Pipe.Pp/Bricks.Sr/Cement.Sr/Plaster.Sr/Roof.Ou.Sr/Weld.Sh/Part.In.Mc.El.Sr.As/Piece.In.Mc.El.Sr.Sb/Path.In.Mc.El.Sr.Ar.As.Sb/Xline-R.Sh/Xpoint.Sh/Dimension.Dm/Shadow.Sh/Beam.Sr/Column.Sr/NeastingCut.Sr/Plastic.Sr/Steel.Sr/Iron.Sr/Rubber.Sr/Fibber.Sr/Annotation.Tx/Texts.Tx/Mtext.Tx/Line.Sh/Strip.Sh/Dash.Sh/Dot2x.Sh/Connecting.Sh/Arrow.Sh/Breakline.Sh/GeneralARM.Ga/Assembly.As/Sub.Assembly.Sb] : "))

 (setq layer (car (member layer layers)))

 (if (setq ss (ssget "_:L"))
   (command "_.chprop" ss "" "_LA" layer ""))
 (princ))

 

 

 

On the code an above have only can create them by manually and should write those firstly one by one on the vlisp routine.

Please need help from the master on this forum or anyone can solve this problem and guides me..

Create the list of layer an automatically by vlisp.jpg

Edited by Deby Ferdian
Fix word of "bye"
Posted

A simpler way pick all the objects, then use the layers toolbar and just scroll up/down and pick the correct layer, its like doing a chprops without all the effort.

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