See the top rated post in this thread. Click here

Results 1 to 5 of 5

Thread: Moving items from suffixed layer into non-suffixed

  1. #1
    Member
    Join Date
    2020-07
    Posts
    14
    Login to Give a bone
    0

    Default Moving items from suffixed layer into non-suffixed

    There's a random problem I'm encountering in processing dxf information coming out of a trimble survey controller. It's random in the fact that 50% of the controllers do this and 50% don't, I think it's something to do with the age of the OS on each of the controllers.

    The newer OS controllers write the block attributes into a different layer than the block itself. So we have the point block "DIAG_CROSS" in, say, 'SW' layer but all the attributes, size etc, appear in a layer 'SW_Attrib'. Historically this hasn't been a big issue, but now we're dealing with larger and larger data sets it's becoming a logistical nightmare to select and change the layer of multiple text and block items created by our LISPS.

    E.g. I run a LISP that identifies the attribute 'SIZE' and it creates the text and orients it to the associated linework, but it goes into a new layer 'SW_Attrib_txt' and then I have to select the text,select similar, and move them into the "SW_txt" layer of our standard drawing template, which has predefined colours etc.

    Because the linework in the dxf is already in layer 'SW' I can't change the layer naming using [ RENAME> *_Attrib > * ] because the layer already exist.

    Is there a simple LISP to "move" the attributes from SW_Attrib into SW, wholesale for all instances of _Attrib layers?

    Thx in advance.

  2. #2
    Active Member
    Join Date
    2015-12
    Location
    Western Europe
    Posts
    57
    Login to Give a bone
    0

    Default Re: Moving items from suffixed layer into non-suffixed

    This can be easily accomplished using lisp by iterating the block table and searching through the items in each block definition for attributes on the old layer and changing them to the new layer. The only drawback is that they are attributes and that would require either an "ATTSYNC" or closing and opening the drawing for the layer change to percolate down to the block references if the drawing is open. there is also the option of running the lisp via something like "ScriptPro" or Lee Macs "ScriptWriter" which if set up correctly will batch load and process drawings, although you may have to explicitly add a save to the end of the script.

  3. #3
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    555
    Login to Give a bone
    0

    Default Re: Moving items from suffixed layer into non-suffixed

    If its only the one master point block then use bedit and attsync or are you saying there are many different blocks.

    Post a dwg and the list of blocks plus old and new layers.

    For me a text file is best as its easier to add to, rather than changing a list inside the code. blkname, new, old

  4. #4
    Active Member
    Join Date
    2015-12
    Location
    Western Europe
    Posts
    57
    Login to Give a bone
    2

    Default Re: Moving items from suffixed layer into non-suffixed

    Ignore my last.

    If I have understood your request correctly then the attached should solve your problem. Load it and type GCAL to run. It will search all blocks definitions and block references with attributes, removing single or multiple instances of "_Attrib" from the attribute layer names.
    Attached Files Attached Files

  5. #5
    Member
    Join Date
    2020-07
    Posts
    14
    Login to Give a bone
    0

    Default Re: Moving items from suffixed layer into non-suffixed

    O.......M....G!!

    dlanor thank you so much. I didn't intend to be rude, I'd read your first reply and put the issue on the to-do list for later. This routine will save me so much make-work tyvm

Similar Threads

  1. Replies: 3
    Last Post: 2011-11-22, 08:21 PM
  2. moving items to a "future" phase - RAC2008
    By jmarchese in forum Revit Architecture - General
    Replies: 3
    Last Post: 2009-04-22, 07:43 PM
  3. Moving items
    By foxy3298 in forum AutoCAD General
    Replies: 1
    Last Post: 2009-03-16, 01:17 PM
  4. Moving items between Worksets
    By ron.sanpedro in forum Revit - Platform
    Replies: 2
    Last Post: 2008-03-07, 10:03 PM
  5. Moving items to 0,0
    By cadd4la in forum AutoCAD General
    Replies: 5
    Last Post: 2005-06-07, 04:30 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
  •