See the top rated post in this thread. Click here

Results 1 to 8 of 8

Thread: Need to separate characters from one place(ctab variable) into multiple attributes

  1. #1
    Member
    Join Date
    2021-04
    Posts
    3
    Login to Give a bone
    0

    Question Need to separate characters from one place(ctab variable) into multiple attributes

    Hello

    As title says, I want to split up sheet name in separate parts. I guess there should be option for it, but I just don't know what it is.
    I imagine I should first get ctab and it should go into another operation which will extract specified number of characters.

  2. #2
    Certified AUGI Addict cadtag's Avatar
    Join Date
    2000-12
    Location
    Cairo - no, not Illinois
    Posts
    5,069
    Login to Give a bone
    0

    Default Re: Need to separate characters from one place(ctab variable) into multiple attributes

    This sounds like a job for LISP.

  3. #3
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,096
    Login to Give a bone
    0

    Default Re: Need to separate characters from one place(ctab variable) into multiple attributes

    DIESEL may be an option for field manipulation.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  4. #4
    Member
    Join Date
    2021-04
    Posts
    3
    Login to Give a bone
    0

    Default Re: Need to separate characters from one place(ctab variable) into multiple attributes

    Can you pinpoint me to the code?

  5. #5
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,096
    Login to Give a bone
    0

    Default Re: Need to separate characters from one place(ctab variable) into multiple attributes

    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  6. #6
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,658
    Login to Give a bone
    0

    Default Re: Need to separate characters from one place(ctab variable) into multiple attributes

    More DIESEL references:
    https://www.fourmilab.ch/diesel/
    http://beauford.altervista.org/CADVANTAGE/Diesel.htm Original site was taken down so I copied an archive of it.
    https://help.autodesk.com/view/ACD/2...A-EB49CC6C1C72

    DIESEL works in AutoCAD Lt as well but depending on what you're doing with the text there's a lot more string handling functions in lisp.

    Go ahead and let us know how you want the sheet name broken down with a couple examples.
    Will they be split at a space, number, character, or symbol or group of characters?

  7. #7
    Member
    Join Date
    2021-04
    Posts
    3
    Login to Give a bone
    0

    Default Re: Need to separate characters from one place(ctab variable) into multiple attributes

    Quote Originally Posted by Tom Beauford View Post
    Go ahead and let us know how you want the sheet name broken down with a couple examples.
    Will they be split at a space, number, character, or symbol or group of characters?
    CL1_HYD_00492_051_004: 004 - page number attribute, CL1_HYD_00492_051 - document number, CL1 - lot number.
    if it's possible, I'll also change sheet name and add exact chainage and parent road. like this:
    CL1_HYD_00492.14_051_LR17_004: 004 - page number attribute, CL1_HYD_00492(.14 removed)_051 - document number, CL1 - lot number, 00+492.14 chainage, LR17 - parent road.

    I found this function, but it separates only with comma, I think. And I can't put comma in layout name.
    $(INDEX,which,string)
    string is assumed to contain one or more values delimited by the macro argument separator character, comma. which selects one of these values to be extracted, with the first item numbered zero.

    If I could separate with "_", then first option would be possible. For the latter option, I'll also need to separate with "." character, but I could also use "_" instead of ".", though it's better visually to write "."

    My knowledge in coding is extremely limited. I also found this function:
    $(SUBSTR,string,start,length)
    Returns the substring of string starting at character start and extending for length characters. Characters in the string are numbered from 1. If length is omitted, the entire remaining length of the string is returned.

    Will try this one later. I think it would work fine too.
    Actually tried it already. Does work. Shame I already had to manually fill up 400+ sheets

  8. #8
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,658
    Login to Give a bone
    1

    Default Re: Need to separate characters from one place(ctab variable) into multiple attributes

    Could not figure out what you're trying to do from your post.
    Is "CL1_HYD_00492_051_004: 004 - page number attribute, CL1_HYD_00492_051 - document number, CL1 - lot number" the current layout name?
    By "Actually tried it already. Does work." are you saying you've got everything working now?

Similar Threads

  1. 2018: link Visibility, Linear Parameter, or Point Parameter to CTAB value
    By dgregory85 in forum Dynamic Blocks - Technical
    Replies: 0
    Last Post: 2018-09-20, 03:58 PM
  2. CTAB Field prints as pound sign when using Publish
    By ahearrean in forum AutoCAD Fields
    Replies: 3
    Last Post: 2016-08-03, 01:04 PM
  3. Extract value of ctab field to xls file
    By paulof in forum AutoLISP
    Replies: 21
    Last Post: 2011-05-01, 08:30 PM
  4. Replies: 17
    Last Post: 2009-03-01, 03:00 AM
  5. First or Last Didgets in CTAB
    By Zuke in forum AutoCAD Fields
    Replies: 2
    Last Post: 2008-03-16, 06:16 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
  •