block view problem

Started by potencjalek, December 17, 2013, 02:22:49 PM

Previous topic - Next topic

potencjalek

HI
i have problem with block view
i was thinking that i can't show it in block view window at all
but i found out that i can see it only after i insert it in model space
why is that?
if I don't insert blocks in model space block view doesnt works
i use
(dcl_BlockView_DisplayBlock SKZElementy_Elementy_BlockView1 "dj_sygnalizator_S1_E" 0 0)
which returns T
but on blockview i cant see anything

maybe I do something wrong when i load blocks
i use function
Code (autolisp) Select

(defun pobierz_bloki (path / ss_bloki space newblk i)
(defun activespace (doc)
    (if (or (= acmodelspace (vla-get-activespace doc))
            (= :vlax-true (vla-get-mspace doc)))
        (vla-get-modelspace doc)
        (vla-get-paperspace doc)
    )
)
(setq ss_bloki (ssadd))
(setq space (activespace (vla-get-activeDocument (vlax-get-acad-object))))
(foreach bname (vl-directory-files Path "*.dwg" 1)
(progn
(if (tblsearch "block"(vl-filename-base bname))
nil
(progn
(setq newblk (vla-insertBlock space '(0 0 0) (strcat path bname) 1.0 1.0 1.0 0.0))
(ssadd  (entlast) ss_bloki)
)
)
)
)
(setq i 0)
(while (ssname ss_bloki i)
(entdel (ssname ss_bloki i))
(setq i (+ i 1))
)
i
)

where path is directory to folder with blocks

owenwengerd

After running your code, do you see the blocks OK in the MISC sample blockview tab? As long as they are defined, you should be able to view them, but you may need to set a correct zoom scale factor and view direction.

potencjalek

#2
i can see it in preview in drawing explorer

i run my code and I load all blocks from specified folder

but i don't put them into model space
until I insert them in model space i can't see it in block view (but i can see it in preview in drawing explorer)

i dont think its problem with zoom scale and view direction because after inserting block in model space block view works good

and i work in bicscad v13

roy_043

I think this may be this old problem:
http://www.opendcl.com/forum/index.php?topic=1676.0
I don't know when this has been solved but I don't experience it with:
BC 13.2.10
ODCL 7.0.1.1

potencjalek

i checked it in Bricscad V14 and I looks like they fixed the bug
works good in new version