WblockCloneObjects - ErrorStatus.NotAllowedForThisProxy

WblockCloneObjects - ErrorStatus.NotAllowedForThisProxy

Ertqwa
Advocate Advocate
602 Views
1 Reply
Message 1 of 2

WblockCloneObjects - ErrorStatus.NotAllowedForThisProxy

Ertqwa
Advocate
Advocate

Hello forum,

 

If I insert a drawing as a block, it works with drawings that contain proxy objects (substitute for a custom object). But when I insert a block from another drawing (and this block contains proxy objects) I get an error "ErrorStatus.NotAllowedForThisProxy". I use the following code:

 

Insert a drawing as a block (works with proxy objects):
DatabaseSource.ReadDwgFile(StringPath, FileOpenMode.OpenForReadAndAllShare, false, null);
ObjectIdBlock= DatabaseActive.Insert(Path.GetFileNameWithoutExtension((StringPath, ), DatabaseSource, true);

 

Insert a block from another drawing (error with proxy objects):
DatabaseSource.ReadDwgFile(StringPath, FileOpenMode.OpenForReadAndAllShare, false, null);
BlockTableSource = TransactionSource.GetObject(DatabaseSource.BlockTableId, OpenMode.ForRead) as BlockTable;
ObjectIdCollectionBlock.Add(BlockTableSource[StringBlockName]);
DatabaseActive.WblockCloneObjects(ObjectIdCollectionBlock, DatbaseActive.BlockTableId, iMap, DuplicateRecordCloning.Ignore, false);

 

The error is thrown by the function "WblockCloneObjects()".
Both versions are processing the same proxy object.

 

Why does the first version work ok with proxy objects, and the second one throws the error "ErrorStatus.NotAllowedForThisProxy"?

 

Thank you.

0 Likes
603 Views
1 Reply
Reply (1)
Message 2 of 2

Ertqwa
Advocate
Advocate
Hello forum,

The question was already asked. Unfortunally I can't delete my post.

http://forums.autodesk.com/t5/objectarx/wblockcloneobjects-returns-enotallowedforthisproxy/td-p/3786...

Thank you.
0 Likes