0

I am using Design Automation V3 endpoint with the pre-defined activity AutoCAD.PlotToPDF+prod I am observing that the styles defined in CTB are not taken into account on export to PDF. I am passing the CTB file in "References" object to the HostDwg as explained in Please let me know the script for applying ctb when converting DWG file to PDF

I downloaded the WorkItemStaus Report and see that the job information processes the CTB file that is being supplied in the references

[02/25/2025 16:17:03] Job information:
en{
"CommandLine": [
    "$(engine.path)\\accoreconsole.exe /i \"$(args[HostDwg].path)\" /s $(settings[script].path) /suppressGraphics"
],
"Settings": {
    "script": {
        "value": "_tilemode 0 -export _pdf _all result.pdf\n"
    },
    "dasOpenNetwork": {
        "value": "true",
        "isEnvironmentVariable": true
    }
},
"Id": "e2a31bb7228446899c643efe5783230f",
"ActivityId": "AutoCAD.PlotToPDF+prod",
"EngineId": "Autodesk.AutoCAD_25_0!39",
"Apps": [],
"BoundArguments": {
    "HostDwg": {
        "localName": "$(HostDwg)",
        "references": [
            {
                "localName": "CTB",
                "url": "urn:adsk.objects:os.object:dasplotting_4d9ba11747d148eda09c1cb1ee6d60bd/20250225111658_input_TEST.ctb",
                "headers": {
                    "Authorization": "Masked:t0afgbb36oH4lDJf80dG75J2ziY="
                },
                "verb": "get"
            }
        ],
        "url": "urn:adsk.objects:os.object:dasplotting_4d9ba11747d148eda09c1cb1ee6d60bd/20250225111658_input_XXX-PRN-3711-ONS-CCC-DES-DRG-00100.dwg",
        "headers": {
            "Authorization": "Masked:t0afgbb36oH4lDJf80dG75J2ziY="
        },
        "verb": "get"
    },
    "Result": {
        "localName": "result.pdf",
        "url": "urn:adsk.objects:os.object:dasplotting_4d9ba11747d148eda09c1cb1ee6d60bd/20250225111658_output_result.pdf",
        "headers": {
            "Authorization": "Masked:t0afgbb36oH4lDJf80dG75J2ziY="
        },
        "verb": "put"
    }
},
"Quotas": {
    "limitProcessingTimeSec": 900,
    "limitTotalUncompressedAppsSizeInMB": 500
}
}

However, the actual export command gives the error "Incompatible or missing plot style" and skips the ctb so the generated PDF has no styles.

enter image description here

Questions:

  1. Is Reference object to HostDWG is not how the CTB file should be supplied?
  2. The script command that gets executed does not have any argument to take the CTB? Is that the issue? If yes what is the script to provide ctb file as an argument?
2
  • 1
    I have answered this in detail here - stackoverflow.com/a/62773224/2919353 Commented Feb 25 at 17:46
  • @MadhukarMoogala: Thank you, I understand that the .ctb file has to be in the Plotters/PlotStyles folder for it to take effect. Thats how I have it in my local. But how would I pass it to the predefined activity AutoCAD.PlotToPDF+prod. I tried passing it as a Reference to HostDWG as shown in my question, but that didn't work. Commented Feb 25 at 18:27

1 Answer 1

0

Learnt that there are 2 ways to address this:

  1. Adding references. Note: The exact ctb file name with its extension needs to be passed as explained in https://stackoverflow.com/a/55717191/6664129
  2. Alternatively, zip the drawing and ctb and pass it to the workitem and use pathInZip as explained in https://stackoverflow.com/a/79469421/6664129
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.