Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Complex Move Object to New Layer Routine

  1. #1
    Member
    Join Date
    2008-08
    Posts
    9
    Login to Give a bone
    0

    Default Complex Move Object to New Layer Routine

    Hi All,

    I have only recently started learning how to create Lisp routines and I have run into a very tedious task that I figure a lisp routine could easily help me to automate to make things run easier. The only problem is this lisp routine is a very complex routine that has me baffled.

    The problem I have is I have been doing some major drawing clean up and CAD standardization which required me to create new layers, colors, linetypes and text styles for numerous drawings. I have to move all the entities on old layers to the newly created layers. This has become a very tedious task when it comes to certain types of objects on certain layers that I have to split up. For this process I have been using the layer isolate/unisolate and the filter command to filter these objects out and move them to the correct layer. This is highly tedious.

    What I am trying to figure out is I am looking for a lisp routine that would select all the objects on a specified layer by layer name, object type, color and possibly text value if applicable and move them to a specified layer name. I would have the name of all layer names and object names necessary to input in the routine.

    If someone is able to provide a solution to this dilemma it would be greatly appreciate. I know this is a very complex problem.

    Thanks All.

  2. #2
    AUGI Addict
    Join Date
    2008-02
    Posts
    1,141
    Login to Give a bone
    0

    Default Re: Complex Move Object to New Layer Routine

    Look at LayTrans and Standards?

  3. #3
    Active Member
    Join Date
    2001-02
    Location
    Charlotte
    Posts
    89
    Login to Give a bone
    0

    Default Re: Complex Move Object to New Layer Routine

    Also look at laymrg (format, layer tools) I've used it for simple lisp or scripting.

  4. #4
    Member
    Join Date
    2008-08
    Posts
    9
    Login to Give a bone
    0

    Default Re: Complex Move Object to New Layer Routine

    Those do not do the function I am looking for. The reason I need to do this is because there are objects that are all on the same layer that I have to split up and move to a different layer.

    Example: These drawings contain many layers of objects. There are many points on several of these layers that have single line text along with a point marker for each set of text group. This is for a land survey data that I have to split up onto different layers for the purpose of tracking. Each point marker has three lines of single line text of which all are a different color. Every grouping of survey points have their own layer names as well. So there are many layer names.

    What I need to do is select each text by their layer name and their color and split them on different layers that I have created. The point markers have their own layer as well. Each line of text and each color of text needs to be on their own layer. Layer Translator is not capable of doing this. I have been doing this by filter but it is extremely tedious when you have hundreds of these points and several drawings with hundreds of these points.

    This is why I need to try to create a lisp routine for this task to try to automate it a bit.

  5. #5
    AUGI Addict
    Join Date
    2008-02
    Posts
    1,141
    Login to Give a bone
    0

    Default Re: Complex Move Object to New Layer Routine

    So you need to step through the drawing and put all blocks on a layer, all text on a layer, etc.?

  6. #6
    Member
    Join Date
    2008-08
    Posts
    9
    Login to Give a bone
    0

    Default Re: Complex Move Object to New Layer Routine

    OK I will do a walk through with you...

    Example:

    Filter1:
    Object: Text
    Layer: X1
    Color: red

    Select all

    Move to: Layer: ELEV

    Filter2:
    Object: Text
    Layer: X1
    Color: yellow

    Select all

    Move to Layer: IDEN

    Filter3:
    Object: Text
    Layer: X1
    Color: green

    Select all

    Move to Layer: DESC

    Filter4:
    Object: Block
    Layer: X1
    BlockName: ex

    Select all

    Move to Layer: LOCS

    That is what I have been having to do in filter and I would like to create a lisp routine that could do this without me having to do all this work. The only thing is the move to layer names are all different as is there are numerous origination layers to do as well so this would end up turning into a large lisp routine, but each origination layer would have 3-4 of these selection and move routines because I would have to split these four items up.

  7. #7
    AUGI Addict
    Join Date
    2008-02
    Posts
    1,141
    Login to Give a bone
    0

    Default Re: Complex Move Object to New Layer Routine

    So the layering is based on object and object color?
    Wouldn't be too terribly difficult to code.

  8. #8
    Member
    Join Date
    2008-08
    Posts
    9
    Login to Give a bone
    0

    Default Re: Complex Move Object to New Layer Routine

    Cool. I just have a hard time figuring out where to start.

  9. #9
    AUGI Addict
    Join Date
    2005-08
    Posts
    1,043
    Login to Give a bone
    0

    Default Re: Complex Move Object to New Layer Routine

    How are you envisioning it Alan? I would setup a filter list of the property names and values for each option. Then check each entity against it to change the layer. That way you only have to step through the drawing once. I'd set it up with ActiveX, so that it could be called through ObjectDBX later.

  10. #10
    Member
    Join Date
    2008-08
    Posts
    9
    Login to Give a bone
    0

    Default Re: Complex Move Object to New Layer Routine

    Quote Originally Posted by alanjt View Post
    So the layering is based on object and object color?
    Wouldn't be too terribly difficult to code.
    It is based on OBJECT, LAYER NAME and OBJECT COLOR. Occasionally I might have to include a TEXT VALUE if applicable but that is only for certain layer names. If the object is a block, then I need to include BLOCK NAME.

    OBJECT: Text
    LAYER: <LayerName>
    COLOR: <Color>

    OBJECT: Text
    LAYER: <LayerName>
    TEXTVALUE: <TextValue>

    OBJECT: Block
    LAYER: <LayerName>
    BLOCKNAME: <BlockName>

    OBJECT: Line
    LAYER: <LayerName>
    COLOR: <Color>

    These are the four typical filters I need to use to select the objects. I don't think I have really used any other filter for this process other than these four.

Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 3
    Last Post: 2008-12-29, 10:58 AM
  2. Replies: 8
    Last Post: 2007-05-16, 01:29 AM
  3. Replies: 10
    Last Post: 2007-04-27, 06:17 PM
  4. Replies: 6
    Last Post: 2006-04-27, 09:22 PM
  5. how can move an object from one layer to another?
    By lambertm in forum VBA/COM Interop
    Replies: 1
    Last Post: 2005-05-20, 12:07 PM

Posting Permissions

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