cart: empty [ Login ]

Export Layout to PDF

1 
McGum
3/28/2019 7:23 AM
Hi, I found (after hours reaserching) a bug. I'm drawing a lot of entitys and on the end, I'm using the sort mechanism:
C# Code:
#region Reorder dxfModel.SetHandles(); var sortents = new DxfSortEntsTable(); var tubEnts = dxfModel.Entities.Where(e => e.Layer == dxfModel.Layers[CADLayerStrings.StrTubs]).ToList(); foreach (var tubEnt in tubEnts) { sortents.EntitySortWrappers.Add(new DxfEntitySortWrapper(tubEnt, 0)); } dxfModel.ModelLayout.OwnerBlock.ExtensionDictionary = new DxfDictionary(); dxfModel.ModelLayout.OwnerBlock.ExtensionDictionary.Entries.Add(new DxfDictionaryEntry(DxfDictionaryEntry.Names.AcadSortEnts, sortents)); #endregion
Then: I have a method who is creating some additional layers and entities (somewhere in the model). I set the viewport of a layout to the target and export this to pdf. The PDF shows only the layer with was created bevor the code above. The DWG locks fine in ACAD. When I uncomment the code above then it works fine [even when I save to DWG and reload - so, no chance to give you a DWG what dosn't work :(]. Thanks for your investigation! Regards, Michael
Wout
3/28/2019 9:49 AM
Hi Michael, I need a complete working program + input data to reproduce. - Wout
McGum
3/28/2019 10:35 AM
Hi Wout, dont have a idea how to give you a debug enviroment ... I cant sent you our software ^^
rammi
3/28/2019 11:53 AM
Just to be sure: what happens if you write out the model as DWG, then load that DWG and convert it to PDF?
  • If this works okay my guess would be that some internal caching in CadLib might fail regarding SORTENTS.
  • And if it does not produce the PDF you are expecting we have a test file.
- Rammi
Wout
3/28/2019 1:04 PM
Just create a small program that recreates the problem. - Wout
McGum
3/28/2019 1:47 PM
I tryed .. but with a small program it works ^^
Just to be sure: what happens if you write out the model as DWG, then load that DWG and convert it to PDF? If this works okay my guess would be that some internal caching in CadLib might fail regarding SORTENTS. And if it does not produce the PDF you are expecting we have a test file. - Rammi
If i write to DWG an load and produce the pdf then its fine! So, I dont see any chance to give you somthing what you can debug :(
Wout
3/28/2019 1:49 PM
Well, then that program does not do the same thing. - Wout
McGum
3/28/2019 2:02 PM
Yes .. will try to create a part of software with I can repro this .. but this will tak a while .. I have a workaround so, that this works for now ..
1