Certified SOLIDWORKS® Solution Partner|Built for SOLIDWORKS and SOLIDWORKS PDM Professional|Free Community Edition, no key needed

Guides and comparisons

Publish conditions in practice: three setups you can copy

Three PDMPublisher condition setups you can copy: skip purchased parts, export only Released files, and keep one Publish profile per product line.

Publishing Full_Grill_Assembly.SLDASM without conditions gives you STEP files for every bolt, a PDF for a bought-in burner nobody drew, and work-in-progress parts mixed in with released ones. Then someone cleans up the folder by hand. Conditions decide which referenced files get into the job before anything is exported. This article builds three condition setups you can copy and shows how to keep them in one Publish profile per product line.

PDMPublisher Conditions editor showing an OR root group with a nested AND group of condition rows
A condition tree: an OR root with a nested AND group. Build from the root down; nest a group when part of the rule needs the other logic.

What you’ll end up with

  • Setup 1: a condition that keeps made parts and skips purchased ones, so Brace_Corner_&.SLDPRT gets a STEP and the bought-in burner doesn’t.
  • Setup 2: a condition that lets only files in the Released state through, so a part still in Work in Progress never reaches the supplier package.
  • Setup 3: a Publish profile named Grills – Released STEP with both conditions and its own export location, shared with the team by PIN.
  • A review dialog before each add-in run that shows what passed, what didn’t, and why.

Before you start

  • An assembly publish that already works. Conditions filter the references, so turn on Export references to file formats individually first. In the task, that also needs a BOM Template with name, configuration and quantity columns.
  • A property that says whether a part is made or bought. This article uses a custom property named Source with the values Made and Purchased. Use whatever your data card has; the dropdown only lists values available in the current document context.
  • For the state condition in the add-in: a vault selected under PDMPublisher > Settings > PDM with Use vault on. Otherwise State isn’t in the menu. The task always has the vault context.
  • Community Edition of the add-in runs conditions but processes up to 5 references per run. Premium removes that limit. The task has no such limit.

Setup 1: skip purchased parts

Open the editor. In the task that’s the Conditions page of the task. In the add-in select PDMPublisher > Conditions, or use the command arrow to open a named profile.

  1. Leave the root set to And.
  2. Click + (Condition) to add a row. A new row stays Undefined until you pick a comparison.
  3. In Variable, pick Source.
  4. In Comparison, pick Text Equal To.
  5. In Value, type Made. Text comparisons aren’t case sensitive, so made matches too.
  6. Leave Configuration empty. PDMPublisher then reads the value from the referenced configuration.
  7. Click OK.

Only files that pass are processed. If a purchased sub-assembly has children you still want, leave Ignore sub-assembly children when condition checks fail off. Turn it on when a rejected sub-assembly should take its whole branch out of the job. There’s a not-equal text comparison too, so Source not equal Purchased works where some parts have no Source value at all.

PDMPublisher Conditions editor with the Variable dropdown open, listing Workflow, Version, State, FileName, Revision, FolderName, FolderPath, FilePath, ConfigurationName and custom properties such as Cost, Description and PartNumber
The Variable list in the add-in with a vault selected: built-in file values first, then State, Revision and Workflow, then the custom properties found on the files.

Setup 2: publish only released files

  1. In the same tree, click + (Condition) to add a second row under the root.
  2. In Variable, pick State.
  3. In Comparison, pick Text Equal To.
  4. In Value, type Released.
  5. With the root at Anda reference must now be made and released to pass. A part in Under Review is skipped and the review dialog says why.

Conditions are evaluated against the files considered for export during assembly publishing. Whether the top-level assembly itself is tested isn’t covered here, so publish once with the assembly in Under Review and check the result before relying on it.

Setup 3: one profile per product line

In the add-in, a Publish profile stores Publish settings, Annotations and Conditions together. Make one per product line so the export location and the rules travel as a unit.

  1. Open PDMPublisher > Settings > Publish. Select New > New… and name the profile Grills – Released STEP.
  2. Set Export location to C:\Export\Grills\(TopAssemblyName) and Filename to (FileNameWithoutExtension)_Rev(Revision). Select STEP (step) in File formats.
  3. Turn on Export references to file formats individually.
  4. Open Conditions… and build the two rows above. Add a third row, ProductLine Text Equal To Grill*if the vault mixes product lines in one folder. * is a wildcard in Text equal.
  5. Click OK. Repeat for Smokers – Released STEP with its own location and Smoker* value.
  6. To hand the profile to a colleague, select Export, then Export to File… for a .pdmpublisherprofile file, or share it with a six-digit PIN that stays valid for 30 days.

Settings used

SettingValueWhy
RootAndEvery row must pass
Row 1Source · Text Equal To · MadeSkips purchased parts
Row 2State · Text Equal To · ReleasedSkips work in progress
Row 3 (optional)ProductLine · Text Equal To · Grill*Keeps the profile to one product line
ConfigurationEmptyReads the referenced configuration
Export references to file formats individuallyOnConditions filter references
Ignore sub-assembly children when condition checks failOffChildren of a rejected sub-assembly still export
Review dialog (add-in)Always opens before an assembly publishSettings > Publish: condition results are always shown when publishing
Profile nameGrills – Released STEPOne profile per product line

Run it and check the result

In the add-in, select PDMPublisher > Publish with the profile. The review dialog always opens before an assembly publish; the Settings > Publish page says condition results are always shown when publishing. It lists each file with its folder, evaluated destination per format, configuration, quantity, whether a same-name drawing was found, and an Exclusion reason for files that didn’t pass. The summary line reads like 12 included · 2 excluded · 12 files passed conditions.

Clear Use on a file to drop it from this run only; the saved condition tree isn’t changed. Click Publish to go, Edit profile to go back, or Cancel to stop before any file is processed.

After the job, Publishing results groups outputs by source file and configuration. The summary counts published, failed, skipped and cancelled. A file a condition excluded shows as Skipped; select it to read the reason. PDMPublisher > Logs filtered by Skipped shows the same entries.

In the PDM task there’s no review dialog. Run the task from the right-click menu on one assembly, then open the Task Details tab and the log to see which files were checked in.

PDMPublisher Review files to publish dialog listing five files with Use checkboxes, folder, configuration, quantity, drawing found and exclusion reason columns, and output formats for this run
The review dialog after conditions ran: 5 included, 0 excluded. The yellow bar is the Community Edition reminder of 5 references per run.

Variations

  • Parts only. Add a row FileName Text Equal To *.sldprt so sub-assemblies don’t get their own STEP in a supplier job.
  • Only revised files. Add a row on Revision so files with an empty revision are skipped. Empty means no recorded revision in PDM.
  • Different rules for one configuration. Fill in Configuration on a row and PDMPublisher reads the property from that configuration instead of the referenced one.
  • Keep a rule but switch it off. Clear the enable checkbox on a row or group. Disabled items stay in the profile and aren’t evaluated.
  • Move rules between profiles. In the Conditions window, select Export… to save an .edmtdf file, then Import… in the other profile. With no group selected the import replaces the root tree; with a group selected it adds the rules under that group.

Where it goes wrong

SymptomCauseFix
Everything is skippedRoot is And and one row can never pass, such as a property no file hasCheck each row’s value, or move the row into an Or group
Nothing is filteredExport references individually is off, so no references are evaluatedTurn it on; in the task also pick the BOM Template
Row has no effectComparison still Undefinedor the row’s enable checkbox is clearedPick a comparison and re-enable the row
State missing from the Variable list in the add-inNo vault selected under Settings > PDMTurn on Use vault and pick the vault
Purchased sub-assembly skipped but its parts still exportedIgnore sub-assembly children when condition checks fail is offTurn it on if the whole branch should be skipped
Import stoppedA condition row was selected before Import…Select a group or clear the selection, then import again
Old rules disappeared after importImport with no group selected replaces the root treeExport the profile or conditions first
Only 5 files published in the add-inCommunity Edition limit per runActivate Premium, or publish in smaller runs

Verified against

  • conditions.md
  • conditions_solidworks.md
  • pdmpublisher-conditions/add-conditions-and-groups.md
  • pdmpublisher-conditions/condition-fields.md
  • pdmpublisher-conditions/condition-types.md
  • pdmpublisher-conditions/evaluation-rules.md
  • pdmpublisher-conditions/special-variables.md
  • pdmpublishersolidworks-condition-files.md
  • pdmpublishersolidworks-condition-output.md
  • pdmpublisher-options/ignore-sub-assembly-children-when-condition-checks-fail.md
  • pdmpublisher-options/export-references-individually.md
  • pdmpublishersolidworks_profiles.md
  • pdmpublishersolidworks_options.md
  • pdmpublishersolidworks_pdm-settings.md
  • pdmpublishersolidworks_workflow.md
  • pdmpublisher_task_details.md
  • pdmpublisherspecialvariable.md
  • pdmpublisherfaq.md
  • pdmpublishersolidworks_comparison.md
  • pdmpublisher-product-differences.md

Availability

Available in PDMPublisher for SOLIDWORKS (the add-in) and PDMPublisher for PDM Professional (the task). The condition editor is the same in the PDM Professional task and the SOLIDWORKS add-in. The task reads PDM variables from the vault; the add-in reads the open document and its references, plus vault values when a vault is selected. Profiles exist in the add-in only; the task stores its conditions in the task definition.

Documentation and related features

Frequently asked questions

How do I stop PDMPublisher exporting purchased parts?

Add a condition on the property that marks the part as made or purchased, for example Source Text Equal To Made. Only references that pass are exported.

Can PDMPublisher publish only files in the Released state?

Yes. Add a condition with the State variable equal to Released. The task reads the state from the vault; the add-in needs a vault selected under Settings > PDM.

Are condition text comparisons case sensitive?

No. Text comparisons aren’t case sensitive, and Text equal accepts * as a wildcard.

Does the review dialog change my conditions?

No. Clearing Use on a file affects that run only. The saved condition tree and profile stay as they were.

Where to next

PDMPublisher for SOLIDWORKS · PDMPublisher for PDM Professional · All features · Conversion guides · Pricing · Documentation · Contact

The SOLIDWORKS add-in is free to start as the Community Edition. The PDM Professional task comes with a 7-day trial. Download the add-in or start the task trial.