wesleyaqua Posted April 11, 2014 Author Posted April 11, 2014 Although I have no means to check it, if your blocks are saved in a versionprior to 2013, it should work. For example your test library seems to be saved in an older version cause it works for me. ymg ymg I just found a bug. when you are in the list en you select the image name just at the other screen (that would be on the previous page as last) he doesn't go back to the page before (he doesn't "select" an image at that time") Welsey Quote
ymg3 Posted April 12, 2014 Posted April 12, 2014 wesleyaqua, Indeed there is a bug there. Do the following change i the action_tile: (action_tile "blocknameslist" "(setq idx (+ (atoi $value) 1)) (mode_tile (strcat \"sld\" (itoa (- (atoi (substr SlideRef$ 4))(* Pg_No# 20)))) 4) (setq SlideRef$ (strcat \"sld\" (itoa idx)) Pick t) (cond ((> idx (+ (* Pg_No# 20) 20)) (done_dialog 4)) ((< idx (* Pg_No# 21)) (done_dialog 3)) (t (setq idx (- idx (* Pg_No# 20))) (mode_tile (strcat \"sld\" (itoa idx)) 4)) )") In the second clause of the cond we should compare ( we need 21 instead of 20. ymg Quote
GP_ Posted April 17, 2014 Posted April 17, 2014 hi bigal.wel we already uses the mnu way but we are going to revisted the whole library. and with this lsp its easy to update the library. also we made the icons a bit bigger and the text space also. thx for the info anyway (My $0.02) Edit the acad.dcl and add width = 25; or another value that satisfies. before: after: .................... .................... .................... acad_icon: dialog { key = "label"; initial_focus = "listbox"; : row { : list_box { width = 20; height = 21; fixed_height = true; key = "listbox"; allow_accept = true; } : column { : row { : icon_image { key = "icon1"; [b][color=red]width = 25;[/color][/b] } : icon_image { key = "icon2"; [b][color=red]width = 25;[/color][/b] } : icon_image { key = "icon3"; [b][color=red]width = 25;[/color][/b] .................... .................... .................... .................... .................... : icon_image { key = "icon18"; [b][color=red]width = 25;[/color][/b] } : icon_image { key = "icon19"; [b][color=red]width = 25;[/color][/b] } : icon_image { key = "icon20"; [b][color=red]width = 25;[/color][/b] } } /* * : row { * : icon_image { * key = "icon21"; * } * : icon_image { * key = "icon22"; * } .................... .................... .................... Quote
Lee Mac Posted April 17, 2014 Posted April 17, 2014 As I have mentioned my first ignored post by you , here is a sample test of what I indicated to . NOTE : Don not forget to add two slide images with their path . (defun c:Test (/ f d id) ;; Tharwat 02. Apr. 2014 ;; ... Be very careful with this code - Your code will generate a new DCL file for every single use! Check your AppData\\Local\\Temp folder - you will probably see quite a few $VL~~001.dcl files... Quote
wesleyaqua Posted April 18, 2014 Author Posted April 18, 2014 hi Lee mac and gp nice to know but now it already works:). but can be useful in the future. can i also adjust like the lineweight of flatshot so its not 0,0 but default instead ? Quote
sachindkini Posted April 25, 2015 Posted April 25, 2015 dear sir, nice program 1) not store previous path 2) can add sub folder Quote
AIberto Posted April 25, 2015 Posted April 25, 2015 @Snownut Sir, nice job ! Many masters to involve in it ! Great! The Block lib ,Many people need it. Looking forward to the perfect final version . Quote
Rosamund Kwan Posted April 26, 2015 Posted April 26, 2015 Hi wesleyaqua Where is the final version ? I test with Snownut's post , but can't insert to drawing . Quote
Snownut Posted April 26, 2015 Posted April 26, 2015 Here is a final working version.....l, since all code does not fit in one post I just attached the file.Block Library.LSP Quote
AIberto Posted April 26, 2015 Posted April 26, 2015 Here is a final working version.....l, since all code does not fit in one post I just attached the file.[ATTACH]53986[/ATTACH] Dear Snownut .Thanks a lot . Two questions , 1. Every time start ,must select library directory? 2.In dialog, the block does not preview ? Quote
Snownut Posted April 26, 2015 Posted April 26, 2015 Alberto, To correct question #1 replace line #319 in the code with this ; (setq dirtxt (if $userblocks $userblocks (setq $userblocks (vl-filename-directory (getfiled "Select Library Directory:" "C:" "dwg" 16)))) This will set the $userblocks variable to the chosen folder, you will not be able to update/change the userblock folder until you either set the variable to nil or close the drawing and reopen. You could also use this line in the acad.lsp file to set the folder location when ACAD starts; setq $userblocks "c:\\enter directory location here" Quote
AIberto Posted April 26, 2015 Posted April 26, 2015 Alberto, To correct question #1 replace line #319 in the code with this ; (setq dirtxt (if $userblocks $userblocks (setq $userblocks (vl-filename-directory (getfiled "Select Library Directory:" "C:" "dwg" 16)))) This will set the $userblocks variable to the chosen folder, you will not be able to update/change the userblock folder until you either set the variable to nil or close the drawing and reopen. You could also use this line in the acad.lsp file to set the folder location when ACAD starts; setq $userblocks "c:\\enter directory location here" Dear Snownut . Thank you again. What about question 2 ? No preview Quote
Snownut Posted April 26, 2015 Posted April 26, 2015 Could you post one of your block drawings, so I can see what the issue may be. Quote
AIberto Posted April 26, 2015 Posted April 26, 2015 Could you post one of your block drawings, so I can see what the issue may be. Thank you for your time . lib.rar Quote
Snownut Posted April 26, 2015 Posted April 26, 2015 wesleyaqua, be aware that the method of reading the drawing to get the thumbnail work only up to release 2013. Up to there the preview image was stored as a bmp image. From 2013 the png format is used, and szmaicy's code does not handle it. ymg It would appear that the last time the drawings where saved was with a newer version of ACAD, I opened and saved with 2004 and all worked fine. Quote
marko_ribar Posted April 26, 2015 Posted April 26, 2015 Although it may be very odd, but I had the same problem not showing previews of dwgs... However I've tried to initialize VLIDE beforehand and to my surprise it worked... So maybe try this modified version... I've also formatted it better and change little end of code as also error handler and added automatic initialization of VLIDE... Strange, but on my A2009 it doesn't work with this trick... So try it with newer releases of ACAD software... HTH, M.R. USERBLOCK.LSP Quote
AIberto Posted April 27, 2015 Posted April 27, 2015 Although it may be very odd, but I had the same problem not showing previews of dwgs... However I've tried to initialize VLIDE beforehand and to my surprise it worked... So maybe try this modified version... I've also formatted it better and change little end of code as also error handler and added automatic initialization of VLIDE... Strange, but on my A2009 it doesn't work with this trick... So try it with newer releases of ACAD software... HTH, M.R. Thanks marko! Quote
AIberto Posted April 27, 2015 Posted April 27, 2015 Although it may be very odd, but I had the same problem not showing previews of dwgs... However I've tried to initialize VLIDE beforehand and to my surprise it worked... So maybe try this modified version... I've also formatted it better and change little end of code as also error handler and added automatic initialization of VLIDE... Strange, but on my A2009 it doesn't work with this trick... So try it with newer releases of ACAD software... HTH, M.R. Hi marko , I test with "acad2007, 2010, 2013 " , It's still can't preview. Just only pop up "vlide" when "userblock" start . 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.