Author Topic: block view problem  (Read 621 times)

potencjalek

  • Member
  • *
  • Posts: 17
block view problem
« on: December 17, 2013, 03: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
  1. (defun pobierz_bloki (path / ss_bloki space newblk i)
  2. (defun activespace (doc)
  3.     (if (or (= acmodelspace (vla-get-activespace doc))
  4.             (= :vlax-true (vla-get-mspace doc)))
  5.         (vla-get-modelspace doc)
  6.         (vla-get-paperspace doc)
  7.     )
  8. )
  9. (setq ss_bloki (ssadd))
  10. (setq space (activespace (vla-get-activeDocument (vlax-get-acad-object))))
  11. (foreach bname (vl-directory-files Path "*.dwg" 1)
  12.         (progn
  13.                 (if (tblsearch "block"(vl-filename-base bname))
  14.                         nil
  15.                         (progn
  16.                                 (setq newblk (vla-insertBlock space '(0 0 0) (strcat path bname) 1.0 1.0 1.0 0.0))
  17.                                 (ssadd  (entlast) ss_bloki)
  18.                         )
  19.                 )
  20.         )
  21. )
  22. (setq i 0)
  23. (while (ssname ss_bloki i)
  24.         (entdel (ssname ss_bloki i))
  25.         (setq i (+ i 1))
  26. )
  27. i
  28. )
  29.  
where path is directory to folder with blocks

owenwengerd

  • Administrator
  • Hero Member
  • *****
  • Posts: 2594
    • Outside The Box
Re: block view problem
« Reply #1 on: December 17, 2013, 04: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.

potencjalek

  • Member
  • *
  • Posts: 17
Re: block view problem
« Reply #2 on: December 18, 2013, 03: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
« Last Edit: December 18, 2013, 03:11:37 AM by potencjalek »

roy_043

  • Full Member
  • ***
  • Posts: 168
Re: block view problem
« Reply #3 on: December 18, 2013, 04: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

potencjalek

  • Member
  • *
  • Posts: 17
Re: block view problem
« Reply #4 on: December 18, 2013, 06:05:05 AM »
i checked it in Bricscad V14 and I looks like they fixed the bug
works good in new version