Get-FLCItemAssociations

Returns a collection of attachments or affected items which are associated to the given Fusion 360 Manage Item.

Syntax

Get-FLCItemAssociations -Workspace <string> -ItemId <long> -AffectedItems [<CommonParameters>]
<#
PARAMETER
    -Workspace
        Required                true

    -ItemId
        Required                true

    -AffectedItems
        Required                true

    <CommonParameters>
        This cmdlet supports the common parameters: ErrorAction, ErrorVariable
#>
Get-FLCItemAssociations -Workspace <string> -ItemId <long> -Attachments [<CommonParameters>]
<#
PARAMETER
    -Workspace
        Required                true

    -ItemId
        Required                true

    -Attachments
        Required                true

    <CommonParameters>
        This cmdlet supports the common parameters: ErrorAction, ErrorVariable
#>

Directly passing an Item object:

Get-FLCItemAssociations -InputObject <PSObject> -AffectedItems [<CommonParameters>]
<#
PARAMETER
    -InputObject
        Required                true
        Accepts pipeline input: true

    -AffectedItems
        Required                true

    <CommonParameters>
        This cmdlet supports the common parameters: ErrorAction, ErrorVariable
#>
Get-FLCItemAssociations -InputObject <PSObject> -Attachments [<CommonParameters>]
<#
PARAMETER
    -InputObject
        Required                true
        Accepts pipeline input: true

    -Attachments
        Required                true

    <CommonParameters>
        This cmdlet supports the common parameters: ErrorAction, ErrorVariable
#>

Parameters

Type

Name

Description

String

Workspace

The name of the workspace that contains the item whose associated Items are retrieved

Long

ItemId

The ID of the item whose associated Items are retrieved

Item

InputObject

The Fusion 360 Manage Item whose associated Items are retrieved.

SwitchParameter

AffectedItems

Retrieves associated Affected Items (can be Linked Items and/or Managed Items).

SwitchParameter

Attachments

Retrieves associated Attachments.

Return type

LinkedItem[] / Attachment[] ← On success.
empty ← on failure. Exception/ErrorMessage can be accessed using $Error.

Remarks

The SwitchParameters AffectedItems and Attachments cannot be combined.

AffectedItems

The passed -Workspace has to be configured properly and must allow viewing the according Affected Items in the Linked Items Tab.
This tab is often known as Managed Items- or Affected Items Tab (or even “Workflow Items”, “Associated Change Orders”, …) within revisioning workspaces.

For such revisioning Items the cmdlet returns the exact revisions of all the Affected Items from the associated revision-controlled workspaces.

The resulting Items can be located in different Workspaces.

Attachments

The passed -Workspace has to be configured properly and must allow viewing the according Attachments in the Attachments Tab.

The Cmdlet returns a list of all the direct Attachments for the passed Fusion 360 Manage Item.

Examples

To use the examples below a Fusion 360 Manage PLM demo Tenant is required:

Display all the Affected Items for a revisioning Item in Fusion 360 Manage

Connect-FLC -Tenant 'your_tenant_name' -ClientId 'your_client_id' -ClientSecret 'your_client_secret' -UserId '[email protected]'
$item = (Get-FLCItems -Workspace 'Change Orders' -Filter 'ITEM_DETAILS:NUMBER="CO000012"')[0]
$affectedItems = $item | Get-FLCItemAssociations -AffectedItems

#Print details which are displayed in the 'Affected Items' tab in Fusion Manage
$global:index=0
$affectedItems | Format-Table -Property @{name="index";expression={$global:index;$global:index++}},Number,LinkedItem_LifecycleTransition,LinkedItem_EffectivityDate,LinkedItem_FromRevision,LinkedItem_ToRevision,LinkedItem_Disposition

<#
index Number    LinkedItem_LifecycleTransition LinkedItem_EffectivityDate  LinkedItem_FromRevision  LinkedItem_ToRevision  LinkedItem_Disposition
----- --------- ------------------------------ --------------------------- ------------------------ ---------------------- -----------------------
1     001-00001 Bypass Design and Release      18.02.2016 00:00:00                                  A                      Rework
1     001-00001 Bypass Design and Release      18.02.2016 00:00:00                                  A                      Scrap
2     035-00001 Bypass Design and Release      18.02.2016 00:00:00                                  A
...
45    035-00002 Design Revision                06.11.2021 00:00:00         2                        3                      Use Until Depleted
#>

Display all the Attachments for an Item in Fusion 360 Manage

Connect-FLC -Tenant 'your_tenant_name' -ClientId 'your_client_id' -ClientSecret 'your_client_secret' -UserId '[email protected]'
$attachments = Get-FLCItemAssociations -Workspace 'Change Request' -ItemId 7584 -Attachments

#Print details which are displayed in the 'Attachments' tab in Fusion 360 Manage
$attachments | Format-Table -Property 'FileName',Title,Version,@{name="Type";expression={"$([System.IO.Path]::GetExtension($_.'File Name').TrimStart('.').ToUpper()) Image"}},@{name="Size";expression={"$([Math]::Round($_.Size/1KB,1)) KB"}},Description

<#
FileName                    Title                   Version Type   Size      Description
--------------------------- ----------------------- ------- ------ --------- -----------
GT220 Change Proposal.png   GT220 Change Proposal         1  Image 1313.4 KB Screenshot
p681 Heatsink Cap Issue.jpg p681 Heatsink Cap Issue       1  Image 146.5 KB
#>

Error handling, analyze why retrieving Linked Items or Attachments failed using $Error

Connect-FLC -Tenant 'your_tenant_name' -ClientId 'your_client_id' -ClientSecret 'your_client_secret' -UserId '[email protected]'
$linkedItems = Get-FLCItemAssociations -Workspace 'Suppliers' -ItemId 6394 -AffectedItems

if(-not $linkedItems){
   $Error[0].Exception #Returns "FORBIDDEN: User ****: access VIEW_WORKFLOW_ITEMS denied..."
}