How to get the output plot file name inside PlotEnd or Publish event?

How to get the output plot file name inside PlotEnd or Publish event?

copylancer0619
Participant Participant
86 Views
3 Replies
Message 1 of 4

How to get the output plot file name inside PlotEnd or Publish event?

copylancer0619
Participant
Participant

Hi all,


I'm working with Civil 3D and need to capture the actual output file name that gets generated during a plot or publish operation. Specifically, I want to access it inside event handlers like PlotEnd or PublishEnd.


So far, I can hook into the events themselves, but I'm not sure how to reliably retrieve the final plot output file path/name from within those events.


Is there a built-in property or method that exposes this information?

Does it differ between single plot vs. publish (multi-sheet) workflows?


Any code sample or API reference would be really helpful.


Thanks in advance for pointing me in the right direction!

0 Likes
87 Views
3 Replies
Replies (3)
Message 2 of 4

ellen261rister
New Member
New Member

Hello!

To get the output filename from a Civil 3D plot or publish operation, you can't rely on the PlotEnd or PublishEnd event arguments alone, as they don't directly provide this information. For single plots, the best approach is to capture the file path from the user or from the plot settings before the plot command is executed. For multi-sheet publish jobs, the file names are reliably recorded in the publish log file that AutoCAD generates. You can programmatically read and parse this log file after the PublishEnd event fires to get the list of all the generated file paths. 

0 Likes
Message 3 of 4

copylancer0619
Participant
Participant

This information is incorrect. The output file name isn't available beforehand, and the publish log doesn't contain the generated plot paths.

0 Likes
Message 4 of 4

BlackBox_
Advisor
Advisor

If you post your code, it might be easier for us to give you a working solution. 

 

Conversationally, if you're relying on PLOT/PUBLISH (series) in lieu of Autopublish and/or Core Console (parallel), consider prompting the user for a file path/name via dialog, then feed that to your desired plot method. 


"How we think determines what we do, and what we do determines what we get."

Sincpac C3D ~ Autodesk Exchange Apps

0 Likes