Cad64 Posted May 28, 2010 Share Posted May 28, 2010 Ok, I just thought we had another lazy member wanting everything handed to them without bothering to spend 2 seconds of their time to actually look for something. My apologies. When you removed the code, did you place a note saying that the routine was under construction and will be back soon? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 28, 2010 Author Share Posted May 28, 2010 Yes, I did - I believe Asos has actually quoted it a few posts back Quote Link to comment Share on other sites More sharing options...
asos2000 Posted May 28, 2010 Share Posted May 28, 2010 The routine is in fixing machine (Lee brain) Quote Link to comment Share on other sites More sharing options...
zoyad Posted May 28, 2010 Share Posted May 28, 2010 Lee, I'm probably doing something wrong. I downloaded version 1.4. It says last edited 12:13 Today. I ran it on my files - the same once I uploaded for your experimentations, and it did not change anything in them. How should I enter that stacked Registred Mark symbol on the search line? I tried: I-CON®/ Motor with I-CON®/ Control and I-CON® Motor with I-CON® Control and I-CON®^ Motor with I-CON®^ Control and I-CON®/^ Motor with I-CON®/^ Control Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 28, 2010 Author Share Posted May 28, 2010 Zoyad, There are still a few bugs for stacked text, as I stated in my previous posts... But I will say that if the Find String contains formatting that starts halfway through it this is unable to be replaced with the replace string - another known bug. Quote Link to comment Share on other sites More sharing options...
Montinho Posted May 31, 2010 Share Posted May 31, 2010 This stuff is really good. It will be my inspiration for future programs. Thanks LM Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 31, 2010 Author Share Posted May 31, 2010 Glad I could help Thanks, Lee Quote Link to comment Share on other sites More sharing options...
rustym Posted July 8, 2010 Share Posted July 8, 2010 Hi Lee Great program once again! Looking to do the following and can't get to the answer: (if possible though) Example: I have the following text: File Name: Drawing1, File Name: Drawing2, File Name: Drawing3, ect I would like to find&replace Drawing* and replace with a Field value, so I end up with : File Name: Field value is there a way to do this through your program or any other method? (Currently I would record a macro and create a script to delete the complete Dtext and paste the new field value dtext in the same position, but that could sometimes be a problem if the text is not on the exact same position in all the drawings) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted July 8, 2010 Author Share Posted July 8, 2010 Hi Rustym, I'm not sure that my program can currently do that which you are describing - I would think the best way to approach it would be to create a LISP that would create the Field and run this LISP through a Script. Lee Quote Link to comment Share on other sites More sharing options...
rustym Posted July 8, 2010 Share Posted July 8, 2010 yes what I hoping to find. Doesn't have to be field values. The same would apply for someone who want to change the text: 12341000 , 56781000 Searching for *1000 and replace with ABCD1000 on all text. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted July 8, 2010 Author Share Posted July 8, 2010 Yeah, I haven't worked on this program for some time, but I don't think it allows wildcards currently... Quote Link to comment Share on other sites More sharing options...
pinkguju Posted August 3, 2010 Share Posted August 3, 2010 where is the external file saved? the onewith the find and replac entries? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 3, 2010 Author Share Posted August 3, 2010 Here: (vl-filename-directory (findfile "ACAD.pat")) Quote Link to comment Share on other sites More sharing options...
pinkguju Posted August 4, 2010 Share Posted August 4, 2010 i found where it's located BUT it's supposedly in an AutCAD 2002 folder. i don't even have AutoCAD 2002 in my program files. How is it putting it there? There's a shortcut in C:\Documents and Settings\dpate30\Favorites\Autodesk called acad.pat but then when i go to the properties it shows: "C:\Program Files\AutoCAD 2002\Support\acad.pat". i don't have this in my program files and yes i'm looking at hidden files and folders. How do i change this in the .lsp? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 4, 2010 Author Share Posted August 4, 2010 You perhaps had '02 installed in the past, to change it in the LISP you would have to change all the places that involve searching for the ACAD.pat file. As you can probably gather, I've changed this methodology with recent programs, but haven't as yet updated the older ones. Quote Link to comment Share on other sites More sharing options...
CAD-Ninja Posted August 23, 2010 Share Posted August 23, 2010 (edited) Hey LeeMac.... You make people like us in less demand.... calm down.... You've got your pats on the back...we all know your pretty amazing, but leave it at that man. You can provide help without spoon feeding high level applications. For instance. here is my rendition of finding all files within a folder recursively: (defun Get_All_Files (folder pat / tls fdl) (setq tls (append lst (vl-directory-files folder pat 1)) fdl (vl-remove-if '(lambda (x) (member x '("." ".."))) (vl-directory-files folder nil -1))) (if tls (setq tls (mapcar '(lambda (i) (strcat folder "\\" i))tls)) ) (if fdl (progn (setq fdl (mapcar '(lambda (i) (strcat folder "\\" i))fdl)) (foreach x fdl (setq tls (append tls (Get_All_Files x pat))) ) ) ) tls ) This would assist someone who understands what we do, but it won't help someone who doesn't.... you go to far in my opinion. However, as good as I am at this stuff.... You did teach me something with your shell.application object reference for a starting folder location. I have used (ACET-UI-PickDir) in the past for this, and it is good to know that I have an alternative if the ACET function goes away. Edited August 23, 2010 by CAD-Ninja Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 23, 2010 Author Share Posted August 23, 2010 I enjoy writing the programs and figure they are useless just sitting on my hard drive... 1 1 Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 23, 2010 Author Share Posted August 23, 2010 Another possible way to code it : (defun LM:GetAllFiles ( dir typ ) ;; © Lee Mac 2010 (append (mapcar '(lambda ( x ) (strcat dir "\\" x)) (vl-directory-files dir typ 1)) (apply 'append (mapcar '(lambda ( x ) (LM:GetAllFiles (strcat dir "\\" x) typ)) (vl-remove-if '(lambda ( x ) (wcmatch x "`.,`.`.")) (vl-directory-files dir "*" -1)) ) ) ) ) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 23, 2010 Author Share Posted August 23, 2010 You make people like us in less demand.... calm down.... You've got your pats on the back...we all know your pretty amazing, but leave it at that man. You can provide help without spoon feeding high level applications. You've got some good points though - anyone trying to earn a living out of doing this probably isn't going to like me posting free stuff - perhaps its time I took some of it down. Quote Link to comment Share on other sites More sharing options...
CAD-Ninja Posted August 24, 2010 Share Posted August 24, 2010 Yeah I wasn't trying to slight you man. You and I are quite similar actually. I have a whole library of stuff that I have written without specific purpose.... just for the challenge of it (and frequently find ways of using). I get better all the time because I truly enjoy doing this stuff and always find new ways to challenge myself. I do still share what I write with some select peers, but they are people that talk the talk and will look out for the best interest of gifted minds. You might consider delving into some .NET like I have. They've made some pretty interesting advances recently. For clarification, I never said you should take down your work. Once it becomes public property it should probably stay that way; it's not really yours anymore. I think someone like yourself could do a lot of good for likeminded folk without conducting a gravy train though. Again, it is just an opinion and I am not claiming to be right... I enjoy helping people (probably more than getting off; the kicks last longer) but only those with the will and passion to learn something. Those without the dedication and motivation to better themselves are just a waste of your talents..... I think you'll find that the people associated with those two classes have very different goals.... Your peers (people like us) aren't looking for extravagant new toys to abuse. I scanned the code because I figurd there was something to learn from it, but if I wanted something that did the exact same thing.... I would write it from scratch and maybe ask you some questions as I go.... thus learning what you learned along the way, and hopefully finding a better way of doing it in the process. I personally try VERY hard to inspire the leeches when I run into one on a personal level. On rare occasions I actually get one on the right track but for the most part leeches just want to be leeches. *shrug* Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.