figuring out SUBSTR codes

figuring out SUBSTR codes

Anonymous
Not applicable
340 Views
0 Replies
Message 1 of 1

figuring out SUBSTR codes

Anonymous
Not applicable

Good morning all.

 

I'm working on someone else's code (they no longer work here) and trying to figure out what he has done with a SUBSTR code to filter out certain text.

 

I've spent way too much time trying to figure this out and could really use a good eye to help me learn what is going on.

 

the code:

takes text from an attribute, strips certain key words and assigns a weight to it.  EG. looks for a size of 1" and gives it a weight of 10 kgs.

 

the problem:

the text order has changed a bit and now the code does not work 100%.  it no longer recognizes 1/2" increments.  IE. it will recognize 1-1/2" but not 1 1/2".  it thinks 1 1/2" is actually 1/2" and assigns the 1/2" weight to it.

 

the NEW text would read something like this:

%%c2 1/2" x 20' (%%c64mm x 7.6m) SLING

 

the OLD text would read: 

20' x 2 1/2"%%c (7.6m x 64mm%%c) SLING

 

 

I've stripped the code down, as its quite long, and added some notes.  as well uploaded a dwg of the blocks we are using.

 

if anyone could help me decipher whats going on it would be much appreciated. 

 

thankyou

 

0 Likes
341 Views
0 Replies
Replies (0)