.NET

Reply
Contributor
Posts: 14
Registered: ‎04-07-2010
Message 1 of 2 (106 Views)

Publishing problem

106 Views, 1 Replies
07-24-2013 05:05 PM

I'm working on a plugin to import document control information into Sheet Set Manager when plotting and publishing.  So far, everything seems to work as expected, except for a few problems with the EndPublish event that I had to work around.

 

What I'm dealing with now, though, is some inconsistency in the way AutoCAD updates fields during the ExportPDF or ExportDWF commands.  From Publish or SSM, everything works as expected - the new data is imported into the Sheet Set Manager, and the appropriate fields (SheetSet.CurrentSheet.RevisionNumber and SheetSet.CurrentSheet.Purpose) in the drawing update accordingly.  When using the ExportPDF or ExportDWF commands, AutoCAD does not update the fields unless the drawing was saved immediately before being exported.  The PlotDate fields are updating, but the SSM fields are not.

 

I tried saving the drawing, but Database.SaveAs crashes AutoCAD during the CommandWillStart, AboutToBeginPublishing and AboutToBeginBackgroundPublishing events - as I would expect it to.

 

I've tried enumerating all of the paperspace objects (using PublishSheetEventArgs) during the BeginSheet event, and although I can confirm that the fields are being Evaluated, the PDF is showing the unedited values.  I've tried Regenerating the drawing during the AboutToBeginPublishing and BeginSheet events, to no avail.  It seems as though AutoCAD is publishing from a background copy of the drawing that is not available through the Editor/Database objects.

 

Perhaps I should be using a different method (other than Field.Evaluate()) to update fields from the BeginSheet event handler?  What is the correct way to enumerate all of the objects in paper space during the BeginSheet event?  Is there another way to ensure AutoCAD updates these fields?

 

Any help and/or ideas would be appreciated.

 

Thanks.

 

ADN Support Specialist
Posts: 352
Registered: ‎07-24-2007
Message 2 of 2 (76 Views)

Re: Publishing problem

07-25-2013 03:07 PM in reply to: JohnDutz

we need reproducible sample code to understand the problem better





Fenton Webb

Developer Technical Services

Autodesk Developer Network


You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community