Author Topic: Problem: transparent reasterimage and Wblock/WblockCloneObjects  (Read 364 times)

0 Members and 1 Guest are viewing this topic.

MarioR

  • Newt
  • Posts: 53
Hello,

i have  a drawing with transparent rasterimages (topographical rastermap).
From this i like to write a area with Wblock(..) or WblockCloneObjects(..) into new database.
All work fine but the rasterimage lose her transparency information, it seems to be th case are loose the XData-Application ?!

The transparency information is added as XData to rasterimage (origin = "((1001, AcMapRasterExTrClr)(1071, 16777215))" )
In the new Database change the XData to "((1001,_APP0)(1071,16777215))".

What can i do to fix it?

regards Mario

Code - C#: [Select]
  1. using (DocumentLock newDocLoc = newDoc.LockDocument())
  2. {
  3.         using (Database newDb = newDoc.Database)
  4.         {
  5.                 using (Transaction acTransaction = newDb.TransactionManager.StartTransaction())
  6.                 {
  7.                         BlockTable acBlkTblNewDoc = acTransaction.getObject(newDb.BlockTableId, OpenMode.ForRead) as BlockTable;
  8.                         BlockTableRecord acBlkTblRecNewDoc = acTransaction.getObject(acBlkTblNewDoc[BlockTableRecord.ModelSpace], OpenMode.ForRead) as BlockTableRecord;
  9.                         IdMapping acIdMapping = new IdMapping();
  10.                         sourceDatabase.Wblock(newDb, selIds, Point3d.Origin, DuplicateRecordCloning.Ignore);
  11.                         //sourceDatabase.WblockCloneObjects(selIds, acBlkTblRecNewDoc.ObjectId, acIdMapping, DuplicateRecordCloning.Ignore, false);
  12.                         acTransaction.Commit();
  13.                 }
  14.         }      
  15. }
  16. newDoc.Database.SaveAs(newFilename, DwgVersion.Newest);
  17. ...
  18.  

gile

  • Water Moccasin
  • Posts: 2379
  • Marseille, France
Re: Problem: transparent reasterimage and Wblock/WblockCloneObjects
« Reply #1 on: March 18, 2022, 08:50:43 AM »
Hi,
In the target Database, check if the RegAppTable already contains a RegAppTableSymbol named "AcMapRasterExTrClr".
If it does not, create it and ad it to the RegAppTable.
Speaking English as a French Frog

MarioR

  • Newt
  • Posts: 53
Re: Problem: transparent reasterimage and Wblock/WblockCloneObjects
« Reply #2 on: March 20, 2022, 11:34:46 AM »
Hi,
In the target Database, check if the RegAppTable already contains a RegAppTableSymbol named "AcMapRasterExTrClr".
If it does not, create it and ad it to the RegAppTable.

Thanks for youre answare.  :idea:

The realy cause of the problem are my cleanCivilProxy-function that i calling after this.
This clean-function kill also Civil-ReagAppNames like "AcMap*" ...

Now i have the "AcMapRasterExTrClr" exclude from cleaning and it works. :whistling:

with best regards
Mario