Author Topic: ObjectDbx & not explodable  (Read 3001 times)

0 Members and 1 Guest are viewing this topic.

Patrick_35

  • Guest
ObjectDbx & not explodable
« on: February 14, 2008, 11:05:46 AM »
Hello,
I created a block not explodable and i saved it on my hard disk.
In a new drawing, I put this block and looking at its properties. It is not explodable. Perfect
I am creating a connection with ObjectDbx on this block file to watch thus Autocad say why it is not explodable.
And I find nothing  :-(

Thanks

JohnK

  • Administrator
  • Seagull
  • Posts: 10657
Re: ObjectDbx & not explodable
« Reply #1 on: February 14, 2008, 11:19:00 AM »
Two things:
1. How do you make something 'not explodable'?

2. is the item a BLOCK DEFINITION INSIDE the block drawing or is it only items?
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Guest

  • Guest
Re: ObjectDbx & not explodable
« Reply #2 on: February 14, 2008, 11:38:48 AM »
Two things:
1. How do you make something 'not explodable'?


Patrick_35

  • Guest
Re: ObjectDbx & not explodable
« Reply #3 on: February 14, 2008, 11:40:28 AM »
Thanks for your reply

1. An example whith the block "test"
Code: [Select]
(vla-put-explodable (vla-item (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object))) "test") :vlax-false)And i saved it in my hard drive (_.wbloc)

2. In a new drawing, I just do.
Code: [Select]
(defun Ouvrir_dessin_dbx(dwg / dbx)
  (if (< (atoi (substr (getvar "ACADVER") 1 2)) 16)
    (setq dbx (vlax-create-object "ObjectDBX.AxDbDocument"))
    (setq dbx (vlax-create-object (strcat "ObjectDBX.AxDbDocument." (substr (getvar "ACADVER") 1 2))))
  )
  (vla-open dbx dwg)
  dbx
)

(setq dbx (Ouvrir_dessin_dbx "c:/temp/test.dwg"))
And i don't find where is information about explodable.

Thanks

@+

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: ObjectDbx & not explodable
« Reply #4 on: February 14, 2008, 11:50:30 AM »
(vlax-get-property(vla-item (vla-get-blocks axdbDocument)"test")'explodable)

the drawing is not explodable - the block is.  so you have to access the blocks table in the axdbDocument.
James Buzbee
Windows 8

Patrick_35

  • Guest
Re: ObjectDbx & not explodable
« Reply #5 on: February 14, 2008, 12:05:51 PM »
Thanks

I thought about it, but the block "test" doesn't exist. It's a file.
I can look my objects only in ModelSpace

@+

Jeff_M

  • King Gator
  • Posts: 4099
  • C3D user & customizer
Re: ObjectDbx & not explodable
« Reply #6 on: February 14, 2008, 12:22:38 PM »
Patrick,
A Block has the Explodable property but a drawing does not. Once you Wblock it out that property is no longer a part of the definition of that drawing.

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: ObjectDbx & not explodable
« Reply #7 on: February 14, 2008, 01:11:34 PM »
As jeff said.

If your looking for a way to insert standard blocks from a remote location you might want to use a few of the excellent "block managers" posted on this site that use external drawings as "containers" and utilize objectdbx to "import" said blocks into the active drawing.  I use this method and group standard blocks according to CIS divisions.  That way you don't have a gazillion indepenant drawings to manage.  What if a standard changes?  I have 16 drawings that contain all my standard blocks - wait make that 17 for annotation tags and adt styles.
James Buzbee
Windows 8

JohnK

  • Administrator
  • Seagull
  • Posts: 10657
Re: ObjectDbx & not explodable
« Reply #8 on: February 14, 2008, 01:25:19 PM »
>explode
huh?! Thats cool! Never seen that before.

jbuzbee and Jeff answered your question.

jbuzbee, where are these block managers you speak of; ive only seen one from CAB.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: ObjectDbx & not explodable
« Reply #9 on: February 14, 2008, 04:46:59 PM »
Matt W here:

http://www.theswamp.org/index.php?topic=18404.0

Mine here:

http://www.theswamp.org/index.php?topic=16730.msg203685#msg203685

Mine uses OpenDCL (free) and I think Matt's does too . . .
James Buzbee
Windows 8

Patrick_35

  • Guest
Re: ObjectDbx & not explodable
« Reply #10 on: February 15, 2008, 05:51:22 AM »
Jeff_M
Yes, but when I insert this block in a new drawing (and isn't in the blocks table), it is not explodable.
So that information is in the file  :?

jbuzbee
Thanks, I will watch block managers

@+

gile

  • Gator
  • Posts: 2520
  • Marseille, France
Re: ObjectDbx & not explodable
« Reply #11 on: February 26, 2008, 01:03:11 AM »
Hi Patrick

Le bloc "ModelSpace" du fichier peut être décomposable ou non

The "ModelSpace" block of the file can be explodable or not.

Quote
_$ (defun Ouvrir_dessin_dbx(dwg / dbx)
  (if (< (atoi (substr (getvar "ACADVER") 1 2)) 16)
    (setq dbx (vlax-create-object "ObjectDBX.AxDbDocument"))
    (setq dbx (vlax-create-object (strcat "ObjectDBX.AxDbDocument." (substr (getvar "ACADVER") 1 2))))
  )
  (vla-open dbx dwg)
  dbx
)
OUVRIR_DESSIN_DBX
_$ (setq dbx (Ouvrir_dessin_dbx "c:/temp/test.dwg"))
#<VLA-OBJECT IAxDbDocument 06802ce8>
_$ (vla-get-Explodable (vla-get-ModelSpace dbx))
:vlax-true
_$ (vla-put-Explodable (vla-get-modelspace dbx) :vlax-false)
nil
_$ (vla-saveas dbx "c:/temp/test.dwg")
nil
_$ (vla-get-Explodable (vla-get-ModelSpace dbx))
:vlax-false
« Last Edit: February 26, 2008, 03:09:09 PM by gile »
Speaking English as a French Frog