TheSwamp
Code Red => .NET => Topic started by: cadplayer on June 27, 2016, 09:08:01 AM
-
Hello!
Can somebody help to explain how create row
... Setup=Setup_PdfCreator|C:\Temp\Drawing2.dwg ... in dsd-file
[DWF6Version]
Ver=1
[DWF6MinorVersion]
MinorVer=1
[DWF6Sheet:001]
DWG=H:\Dropbox\M31.1.dwg
Layout=001
Setup=Setup_PdfCreator|C:\Temp\Drawing2.dwg
OriginalSheetPath=H:\Dropbox\M31.1.dwg
Has Plot Port=0
Has3DDWF=0
[Target]
Type=6
DWF=C:\Users\dirros.CAD-Q\Documents\MyPublish2.pdf
OUT=C:\Users\dirros.CAD-Q\Documents\
PWD=
[PdfOptions]
IncludeHyperlinks=TRUE
CreateBookmarks=TRUE
CaptureFontsInDrawing=TRUE
ConvertTextToGeometry=FALSE
VectorResolution=1200
RasterResolution=400
[AutoCAD Block Data]
IncludeBlockInfo=0
BlockTmplFilePath=
[SheetSet Properties]
IsSheetSet=FALSE
IsHomogeneous=FALSE
SheetSet Name=
NoOfCopies=1
PlotStampOn=FALSE
ViewFile=FALSE
JobID=0
SelectionSetName=
AcadProfile=Civil3d_Speedy
CategoryName=
LogFilePath=
IncludeLayer=FALSE
LineMerge=FALSE
CurrentPrecision=
PromptForDwfName=TRUE
PwdProtectPublishedDWF=FALSE
PromptForPwd=FALSE
RepublishingMarkups=FALSE
PublishSheetSetMetadata=FALSE
PublishSheetMetadata=FALSE
3DDWFOptions=0 0
That isnīt working...
foreach (Container layout in layouts)
{
DsdEntry entry = new DsdEntry();
entry.DwgName = dialog.FileName;
entry.Layout = layout.name;
entry.Title = layout.name;
//entry.Nps = "AA";
entry.NpsSourceDwg = "C:\\Temp\\Drawing2.dwg";
entry.Nps = "Setup_PdfCreator";
collection.Add(entry);
}
-
Iīm thinking about may Page-Setup is not definition in currently activeDocument where I run publish
So answer perhaps copy Page-Setup from template into currently drawing
Is there a way, reading i no problem more copying
public static void ListPageSetupEx()
{
Document acDoc = Application.DocumentManager.MdiActiveDocument;
// Create a new database object and open the drawing into memory
Database acExDb = new Database(false, true);
acExDb.ReadDwgFile("C:\\Temp\\Drawing2.dwg", FileOpenMode.OpenForReadAndAllShare, true, "");
// Create a transaction for the external drawing
using (Transaction acTrans = acExDb.TransactionManager.StartTransaction())
{
DBDictionary plSettings = acTrans.GetObject(acExDb.PlotSettingsDictionaryId,
OpenMode.ForRead) as DBDictionary;
acDoc.Editor.WriteMessage("\nPage Setups: ");
// List each named page setup
foreach (DBDictionaryEntry item in plSettings)
{
acDoc.Editor.WriteMessage("\n " + item.Key);
}
// Abort the changes to the database
acTrans.Abort();
}
}
In Drawing2 is saved my Page-Setup template with name "Setup_PdfCreator"