wblockCloneObjects

wblockCloneObjects

Anonymous
Not applicable
825 Views
6 Replies
Message 1 of 7

wblockCloneObjects

Anonymous
Not applicable
If I pass the same instance of an AcDbIdMapping variable to wblockCloneObjects()
multiple times are the contents of the AcDbIdMapping cleared in each call to
wblockCloneObjects() or are the contents appended?

I need to do an ordered cloning of entities from one database to another into
specific block table records. Finally I clone block references to the BTR's
into the new database. When done I need to fix handles in the xdata of the new
entities. While wblockCloneObjects() appears to do this, it sets any handles
that point to the references to 0. I guess it's because the are not in the new
database at the time of the call to wblockCloneObjects().

I had thought I could use the same AcDbIdMapping to all the wblockCloneObjects()
calls and then copy the original xdata to the new entities, fixing the handles
at the same time. It doesn't appear to be working the way I had hoped. Anyone
here have any experience doing this type of thing before?

--
|
----+----------------------------------------------
| Byron Blattel
| CADwerx---Applications for AutoCAD
| Autodesk Registered Developer
| email: [email protected]
| web site: http://www.cadwerx.net
|
0 Likes
826 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable
> While wblockCloneObjects() appears to do this, it sets any handles
> that point to the references to 0.

Are you setting the deferXlation argument to wblockCloneObjects() to true
on all but the last calls?
--
Owen Wengerd
President, ManuSoft ==> http://www.manusoft.com
VP Americas, CADLock, Inc. ==> http://www.cadlock.com
0 Likes
Message 3 of 7

Anonymous
Not applicable
> Are you setting the deferXlation argument to wblockCloneObjects() to true
> on all but the last calls?

I don't know how many times I looked at the help and I missed that 😞

Thanks,
--
|
----+----------------------------------------------
| Byron Blattel
| CADwerx---Applications for AutoCAD
| Autodesk Registered Developer
| email: [email protected]
| web site: http://www.cadwerx.net
|
0 Likes
Message 4 of 7

Anonymous
Not applicable
Hello.
I am Really Need For Some Help.

Some Times "wblockCloneObjects" function return me "eWasOpenForWrite", When
I Try Copy Objects From CurrentDatabase To Newly Created One.

Why ???
0 Likes
Message 5 of 7

Anonymous
Not applicable
probably some objects are open 🙂

I think for not coplexive objects you can use simple copy or clone(), and
wblockclone use only for very complexive objects. I used this way to copy
textsyles and dimensionstyles from file to file.

"Iggo" wrote in message
news:[email protected]...
>
> Hello.
> I am Really Need For Some Help.
>
> Some Times "wblockCloneObjects" function return me "eWasOpenForWrite",
When
> I Try Copy Objects From CurrentDatabase To Newly Created One.
>
> Why ???
>
>
0 Likes
Message 6 of 7

Anonymous
Not applicable
Yes But Should Allow To Copy All Kind Of Entities and clone() cannot clone
Polylines.


"Egidijus Vaitiekaitis" wrote in message
news:[email protected]...
> probably some objects are open 🙂
>
> I think for not coplexive objects you can use simple copy or clone(), and
> wblockclone use only for very complexive objects. I used this way to copy
> textsyles and dimensionstyles from file to file.
>
> "Iggo" wrote in message
> news:[email protected]...
> >
> > Hello.
> > I am Really Need For Some Help.
> >
> > Some Times "wblockCloneObjects" function return me "eWasOpenForWrite",
> When
> > I Try Copy Objects From CurrentDatabase To Newly Created One.
> >
> > Why ???
> >
> >
>
>
0 Likes
Message 7 of 7

Anonymous
Not applicable
maybe try cast to acdbcurve and then make clone
"Iggo" wrote in message
news:[email protected]...
> Yes But Should Allow To Copy All Kind Of Entities and clone() cannot clone
> Polylines.
>
>
> "Egidijus Vaitiekaitis" wrote in message
> news:[email protected]...
> > probably some objects are open 🙂
> >
> > I think for not coplexive objects you can use simple copy or clone(),
and
> > wblockclone use only for very complexive objects. I used this way to
copy
> > textsyles and dimensionstyles from file to file.
> >
> > "Iggo" wrote in message
> > news:[email protected]...
> > >
> > > Hello.
> > > I am Really Need For Some Help.
> > >
> > > Some Times "wblockCloneObjects" function return me "eWasOpenForWrite",
> > When
> > > I Try Copy Objects From CurrentDatabase To Newly Created One.
> > >
> > > Why ???
> > >
> > >
> >
> >
>
>
0 Likes