Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

figuring out SUBSTR codes

0 REPLIES 0
Reply
Message 1 of 1
blamAU
271 Views, 0 Replies

figuring out SUBSTR codes

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 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost