OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: potencjalek on December 17, 2013, 02:22:49 PM

Title: block view problem
Post by: potencjalek on December 17, 2013, 02:22:49 PM
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
Title: Re: block view problem
Post by: owenwengerd on December 17, 2013, 03:29:57 PM
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.
Title: Re: block view problem
Post by: potencjalek on December 18, 2013, 02:07:57 AM
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
Title: Re: block view problem
Post by: roy_043 on December 18, 2013, 03:15:57 AM
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
Title: Re: block view problem
Post by: potencjalek on December 18, 2013, 05:05:05 AM
i checked it in Bricscad V14 and I looks like they fixed the bug
works good in new version