BIMSECTIONUPDATE for non-Bim-Sections?

I'm trying to (semi-)automatise the creation of sections and "DWGs from sections" with AutoLisp.

I could create "Sections" and define the "Destinationsfile" in the "SectionSettings" - that's fine. :)
When I start "sectionplanetoblock" I got the dialogue with destinationfile and all that stuff, and "OK" creates the file - that's semi-fine. ;)
When I start "bimsectionupdate", then nothing happens - I suppose because my sections are no BIMSECTIONS. That's not fine :'(

So what has to be defined in the "SectionSettings" that it is recognized as BIM-Section?

Thanks in advance!

Peter

Comments

  • Have you tried using the bim:set-bimtype function from the BricsCAD BIM LISP API? I can't test this myself as I do not have a BIM license.

  • Thanks for the hint. This could be helpful for other projects, but this code must be run under basic Bricscad.

  • I did have a go at using 'vanilla' Lisp before posting my previous answer. I have tested in V16 BIM with a dwg that already had a BIM section. The result of the code is a BIM section that looks correct but somehow the 'DB_MANAGER' link is not applied [See (cons 330 dbMan)]. In general the BIM stuff in dictionaries is not accessible in vanilla Lisp.

    (defun Get_DB_MANAGER ( / dict spc)
      (setq spc (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object))))
      (if
        (and
          (= :vlax-true (vla-get-hasextensiondictionary spc))
          (setq dict (vle-dictobjname (vlax-vla-object->ename (vla-getextensiondictionary spc)) "BIM_DATA"))
        )
        (vle-dictobjname dict "DB_MANAGER")
      )
    )
    ; (cdr (assoc 330 (entget (cdr (assoc 330 (entget (car (entsel))))))))
    (defun c:test ( / dbMan enm)
      (if
        (and
          (setq enm (car (entsel)))
          (= "SECTIONOBJECT" (vle-entget 0 enm))
          (setq dbMan (Get_DB_MANAGER))
        )
        (entmod
          (list
            '(102 . "{ACAD_REACTORS")
            (cons
              330
              (entmakex
                (list
                  '(0 . "BimDbSection")
                  (cons 330 dbMan)
                )
              )
            )
            '(102 . "}")
            (cons -1 enm)
          )
        )
      )
      (princ)
    )
    
This discussion has been closed.