Boards /
Runtime/AutoLISP /
Topic 1195
Block Preview Control
Started by jb ·
2010-03-04 14:57 UTC ·
16 replies · SMF topic #1195
jb
2010-03-04 14:57 UTC
When using the Block Preview control to display a drawing it creates two lock files that don't get removed until the current session of AutoCAD is closed. If multiple drawings are selected multiple lock files are created. Is this by design and can it be changed?
I'll upload my Block Manager stuff to test. Load all the lisps that start with BM_*.lsp
command is "BlockManager"
owenwengerd
2010-03-04 16:26 UTC
I loaded the files, but when I click on a filename all I get is a nil echoed at the command line and no block is displayed.
TimSpangler
2010-03-04 17:34 UTC
Not sure if this helps. This discussion came up over at theswamp. I noticed that when the blockview creates the preview it locks the drawings and does not release it. Maybe you can load this one.
jb
2010-03-04 17:43 UTC
Owen, it takes a looooooong time to dispaly a drawing in the BlockPreview control. Don't know why. For testing I made really simple drawings with circles, squares, etc. and there was still a lag .. . . . .
TimSpangler
2010-03-04 18:03 UTC
Another thing that I notice is that if a block was created using a vertical when you select a block from the list you get "Checking for object enablers on the Autodesk website"
Is there anyway of preventing this echo?
owenwengerd
2010-03-04 18:04 UTC
Tim, I am able to load your version, but I couldn't figure out how to get it to display my blocks. I will build a small sample project to test with and have another look.
TimSpangler
2010-03-04 18:09 UTC
Thanks Owen,
It takes a little set up, sorry! If you need some vertical blocks let me know.
owenwengerd
2010-03-04 18:10 UTC
jb, I think them's the breaks when rendering a .dwg file. You might be able to control object enabler behavior via AutoCAD system variables, but parsing .dwg files is never going to be fast. Autodesk added the bitmap preview for dwg files and block icon for block definitions to eliminate the need to parse the .dwg file, so if speed is an issue, using the preview bitmap is one alternative.
TimSpangler
2010-03-04 18:23 UTC
I tried using the demandload variable but I cant seem to get it to set and reset when needed. I tried ausing the mouseon / mouseoff events but then it prints and empty line
6 = 1/2 dozen
thanks
owenwengerd
2010-03-04 18:57 UTC
I've now fixed the problem with lock files sticking around longer than needed. I didn't test it, but the PROXYWEBSEARCH system variable may prevent automatic object enabler checking.
TimSpangler
2010-03-04 19:47 UTC
Is this going to be updated in the next release?
Thanks for the heads up on the variable, the only thing that I could find was the demand load. With that not enable my system didn't load the arx files it needed.
owenwengerd
2010-03-04 20:02 UTC
author=TimSpangler link=topic=1195.msg6414#msg6414 date=1267732043 wrote:
Is this going to be updated in the next release?
Yes, it will be in Alpha 24.
jb
2010-03-04 21:03 UTC
Thanks Owen.
Kerry Brown
2010-03-04 21:49 UTC
< .. > so if speed is an issue, using the preview bitmap is one alternative.
That's what I did in the version I posted.
It's a little jaggy, but very fast even over a network, and quite adequate to get a feel for the drawing content.
TimSpangler
2010-03-08 13:24 UTC
author=owenwengerd link=topic=1195.msg6416#msg6416 date=1267732926 wrote:
[quote author=TimSpangler link=topic=1195.msg6414#msg6414 date=1267732043]
Is this going to be updated in the next release?
Yes, it will be in Alpha 24.
Thanks Owen!
fred_tomke
2010-03-09 08:54 UTC
author=owenwengerd link=topic=1195.msg6410#msg6410 date=1267726241 wrote:
Autodesk added the bitmap preview for dwg files and block icon for block definitions to eliminate the need to parse the .dwg file.
Aha, can it be read out? I ever thought, DWG files are binary coded or compressed. How can such a bitmap be read?
Fred
owenwengerd
2010-03-09 17:27 UTC
The preview bitmap is based on Microsoft's file preview format, and is stored in the same way that other file metadata is stored.