stusic
2007-10-16, 09:51 PM
Hey All,
I've been getting such good help around here, I thought I'd ask for just a bit more... :)
We use a routine here that automatically divides a segment into even spaces in a modified dimension string. The problem is, howeve the routine does it, it doesn't stack the fractions. I've got to go into each dimension and add a space behind the fraction to make it stack, then I've got to backspace to remove the extra space. I haven't been able to figure out how to do a "Find and Replace" to correct these dimensions, since I put "Find: 1/2", Replace with: 1/2""...
See how I'm a bit confused as to how to do this? I'm not literate at LISP at all (although I am trying!), but I have done some of the legwork (see below), I just don't know how to define the function...
Any ideas?
(defun c:Replace ()
(FindReplaceAll "1/16"" "1#16"")
(FindReplaceAll "1/8"" "1#8"")
(FindReplaceAll "3/16"" "3#16"")
(FindReplaceAll "1/4"" "1#4"")
(FindReplaceAll "5/16"" "5#16"")
(FindReplaceAll "3/8"" "3#8"")
(FindReplaceAll "7/16"" "7#16"")
(FindReplaceAll "1/2"" "1#2"")
(FindReplaceAll "9/16"" "9#16"")
(FindReplaceAll "5/8"" "5#8"")
(FindReplaceAll "11/16"" "11#16"")
(FindReplaceAll "3/4"" "3#4"")
(FindReplaceAll "13/16"" "13#16"")
(FindReplaceAll "7/8"" "7#8"")
(FindReplaceAll "15/16"" "15#16"")
(princ)
);defun
Any help would be greatly appreciated!
I've been getting such good help around here, I thought I'd ask for just a bit more... :)
We use a routine here that automatically divides a segment into even spaces in a modified dimension string. The problem is, howeve the routine does it, it doesn't stack the fractions. I've got to go into each dimension and add a space behind the fraction to make it stack, then I've got to backspace to remove the extra space. I haven't been able to figure out how to do a "Find and Replace" to correct these dimensions, since I put "Find: 1/2", Replace with: 1/2""...
See how I'm a bit confused as to how to do this? I'm not literate at LISP at all (although I am trying!), but I have done some of the legwork (see below), I just don't know how to define the function...
Any ideas?
(defun c:Replace ()
(FindReplaceAll "1/16"" "1#16"")
(FindReplaceAll "1/8"" "1#8"")
(FindReplaceAll "3/16"" "3#16"")
(FindReplaceAll "1/4"" "1#4"")
(FindReplaceAll "5/16"" "5#16"")
(FindReplaceAll "3/8"" "3#8"")
(FindReplaceAll "7/16"" "7#16"")
(FindReplaceAll "1/2"" "1#2"")
(FindReplaceAll "9/16"" "9#16"")
(FindReplaceAll "5/8"" "5#8"")
(FindReplaceAll "11/16"" "11#16"")
(FindReplaceAll "3/4"" "3#4"")
(FindReplaceAll "13/16"" "13#16"")
(FindReplaceAll "7/8"" "7#8"")
(FindReplaceAll "15/16"" "15#16"")
(princ)
);defun
Any help would be greatly appreciated!