kasra Posted February 11, 2012 Posted February 11, 2012 Hi dear friends. I need some routines about searching an image file in a folder whit the name i introduced before and tell me it is in that folder or not. All this progress must be done in Auto cad. Can anyone help me about this? Quote
MSasu Posted February 11, 2012 Posted February 11, 2012 You may use the FINDFILE function: (findfile (strcat MyPath MyImageFile)) Regards, Mircea Quote
MSasu Posted February 11, 2012 Posted February 11, 2012 Other solution is to list the images from your folder and check if the one that you are looking for is in that list: (vl-load-com) (setq theImages (vl-directory-files MyPath "*.JPG" 1)) (member MyImageFile theImages) Regards, Mircea Quote
kasra Posted February 11, 2012 Author Posted February 11, 2012 You may use the FINDFILE function: (findfile (strcat MyPath MyImageFile)) Regards, Mircea That 's right. I had forgotten this function. It works good. Thanx for helping. Good Lock. Quote
kasra Posted February 11, 2012 Author Posted February 11, 2012 Other solution is to list the images from your folder and check if the one that you are looking for is in that list: (vl-load-com) (setq theImages (vl-directory-files MyPath "*.JPG" 1)) (member MyImageFile theImages) Regards, Mircea Thanx My Dear Friend. I Should practice more Creativity in my Programming. Quote
MSasu Posted February 11, 2012 Posted February 11, 2012 You’re entirely welcome! Regards, Mircea Quote
BlackBox Posted February 11, 2012 Posted February 11, 2012 Mircea - As you are already using VL* functions, you *may* also find vl-position to be useful. Quote
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.