Jump to content

Recommended Posts

Posted
Although I have no means to check it, if your blocks are saved in a version

prior 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

  • Replies 77
  • Created
  • Last Reply

Top Posters In This Topic

  • ymg3

    24

  • wesleyaqua

    24

  • Snownut

    12

  • AIberto

    6

Top Posters In This Topic

Posted Images

Posted

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

Posted
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:

 

478.jpg

 

 

after:

 

479.jpg

 

 

 

....................
....................
.................... 
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";
*                  } 
....................
....................
....................

Posted
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...

Posted

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 ?

  • 1 year later...
Posted

dear sir,

nice program

1) not store previous path

2) can add sub folder

Posted

@Snownut

Sir, nice job !:thumbsup:

 

Many masters to involve in it ! Great! :thumbsup:

 

The Block lib ,Many people need it.

 

Looking forward to the perfect final version .

Posted

Hi wesleyaqua

Where is the final version ? I test with Snownut's post , but can't insert to drawing .

Posted
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 ?

Posted

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"

Posted
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

 

2015-4-26 23-48-21.jpg

Posted

Could you post one of your block drawings, so I can see what the issue may be.

Posted
Could you post one of your block drawings, so I can see what the issue may be.

 

Thank you for your time .

lib.rar

Posted
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.

Posted

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

Posted
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! :thumbsup:

Posted
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 .

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...