问题
I am searching for an option to define the Plot Settings when converting a .dwg file to a .pdf file. I want to have the converted PDF in greyscale and the linewidth of the Elements is too big. How can I define the Plotsettings in my API call to Forge Design-Automation-API?
Thankyou
回答1:
You will need to create a custom activity to do this. If you know how to do this using the -PLOT
command on the AutoCAD command line then this will be relatively easy exercise. Here's a tutorial that shows how to create a custom activity: https://github.com/szilvaa/acadio-tutorials/blob/master/tutorial2/readme.md.
If you need help with some details then post here.
回答2:
@Kaliph,
regarding with plotting drawing to greyscale, as said, AutoCAD Design Automation (DA) is a kind of headless AutoCAD on the cloud. you could firstly check how local AutoCAD works with the script, then move to DA. e.g. checking '-plot' command in AutoCAD help, you would find the script would export the drawing to greyscale pdf by a plotstyle:
-PLOT Y AutoCAD PDF (General Documentation).pc3 Y Grayscale.ctb \n
please note the spaces, which mean inputting default values. Grayscale.ctb is a default style of gray scale. I'd suggest you play it with local AutoCAD firstly to ensure the inputting.
If you need more flexible configuration on run-time of DA, you would need to produce your own plugin of AutoCAD by C#, VB.NET, C++, LISP. Most requirements have to be implemented by custom commands, instead of by built-in scripts only.
来源:https://stackoverflow.com/questions/50684052/autodesk-design-automation-api-define-plot-settings-e-g-greyscale-linewidth