2013-12-17 22:22 UTC
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
(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
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
(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