Jump to content

Recommended Posts

Posted

I have created a block preview dialog box, which is automatically populated from a particular directory. I find it easier to administer, as each time I add/remove/update a file, the dwgthumbnail is updated, and the listbox that is populated from the directory is done automatically too. The routine remembers the current layer, changes the layer to one i specify, inserts the block, puts the layer back. If i put in a comment on the dwg's properties, a label at the bottom of the form is populated with that information as well.

 

anyways, my issue is, I would like to know how to array (right term?) the dwgthumbnail preview automatically, kind of like the slide library, but with less administration time.

 

I figure the form would need to count how many files exist in that dir, and then for each of the files in that dir, the dwgthumbnail would automatically populate (for example) 5 columns by however many rows it would need.

 

This is the part I am having trouble with.... any ideas?

Posted

thanks for the welcome, i hope to be of some service, and get some knowledge for myself too :)

Posted
thanks for the welcome, i hope to be of some service, and get some knowledge for myself too :)

 

There are so many knowledgeable people on here - you can learn bundles, as I have found out :D

 

Hope the link was helpful. :)

Posted

sorry, im doing it in VBA, it wasnt much, but i have so far got it to count the files in the dir, i just gotta array dwgthumbnail.ocx and all should be sweet.

 

we have another office who insists on using autocads dwg explorer, but it doesnt help with setting layers or any other variables once the block is inserted.

Posted

Ahh, ok - wasn't sure if it was VBA you were doing it in or not - no worries o:)

 

For the office using the in-built ACAD Insertor, I suppose you could use a drawing clean-up LISP that would put all the blocks in the drawing onto the correct layer after you have finished with the drawing.

Posted

Just a suggestion if you do about 5 rows you probably only want 5 columns max. if the form autosizes to fit with more squares you will not be able to make out the images.

 

From past experience I made 2x2 3x3 4x4 & 5x5 6x6 is probably ok

 

Each is an individual form so check number of dwgs and then use correct form as well as "next" eg 30 dwgs use 5x5 =25 "next" use 3x3

 

Just a side issue I have stayed with slides as these allow me to zoom in on the block and have layers off hacked the block making the object clearer to standout before making the slide.

Posted

i am planning on 3-4 columns, with the rows automatically counted from that, so if there are 64 files, with 4 columns, it would make 16 rows, 65 files, would make 17 rows (16 rows with the 17th have one thumbnail)

 

but

 

dwgthumbnail.ocx doesnt have a similar ability to picture (correct?) where you can specify a row and columns, and a spacing?

 

ive already got the file count, so dwgthumbnail1.dwgfilename to dwgthumbnail64.filename, and the dwgthumbnail2.left value would be dwgthumbnail1.value + the size of the thumbnail and a little bit for a gap. so for 3 and 4 it would be similar, and then 5-8 would be the same as 1-4 with a change in the "Top" value and so forth....

 

but, i dont know, at the moment, to tell VBA that the first filename is dwgthumbnail1.dwgfilename, and the 2nd is dwgthumbnail2.dwgfilename etc and so forth, and at the same time, telling it to work out how many rows it would need to make....

 

is it along the lines of dynamic arrays? I have a thumbnail already in a frame, and the frame will put in a vertical scroll bar.

 

i just see it as a way of making the administration easier, put the file in the dir and there is zero coding to get the blocks browser to work. if i continue with slides, then there is making the slide, doing the library etc... one file-copy and its already done.

Posted

Just a thought if using slides why not use autocad to write the menu code ? It does not matter then how many files in a directory or list of directories the only coding needed. The mnu file is only a text file ?

You would first pick new drawings make new slides then just write the menu file a quick menu unload and reload all done.

 

You are right it takes a while to write the menus I use a few tricks from the operating system command line and inside Word to create the files check ^p in search replace.

 

The slides take the longest but depending on your blocks I did 200 in one go using a script watch the screen blink! The advantage is autocad automatically displays them for you and puts next page etc in.

 

If your getting up around 60 blocks why wouldn't you start to break down your block library into smaller common groups to display.

 

I will definately look at writing a program next time

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