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.
Re: Need to separate characters from one place(ctab variable) into multiple attributes
This sounds like a job for LISP.
Re: Need to separate characters from one place(ctab variable) into multiple attributes
DIESEL may be an option for field manipulation.
Re: Need to separate characters from one place(ctab variable) into multiple attributes
Can you pinpoint me to the code?
Re: Need to separate characters from one place(ctab variable) into multiple attributes
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?
Re: Need to separate characters from one place(ctab variable) into multiple attributes
Quote:
Originally Posted by
Tom Beauford
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 :|
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?