Skip to content

Functions

Get Shared Parameters Name

Returns the name of a shared parameter given its parameter ID.

(
  $getSharedParamName := function($sharedParamId){
      $$[type="Parameter" and id = $sharedParamId].name
  };
)

Get Shared Parameters GUID

Returns the GUID of a shared parameter given its parameter ID.

(
  $getSharedParamGuid := function($sharedParamId){
      $$[type="Parameter" and id = $sharedParamId].values.guid
  };
)

Get Family Name

(
  $getFamilyName := function($ParentId){
    $$[type="Family" and id = $ParentId].name
  };
)

Get Instance Shared Parameters

Retrieves all shared parameters for a given FamilyInstance by its parent FamilySymbol ID, excluding parameters whose names start with eV or eE.

For each parameter, the output includes:

  • name → The shared parameter's name
  • value → The current value on the instance
  • guid → The shared parameter GUID

The function selects the first FamilyInstance it finds for the provided parent.id (the FamilySymbol id). If there are multiple instances per symbol, you may want to iterate yourself. If no matching instance exists, the function returns an empty array. If a parameter lacks a known name or GUID in the global Parameter list, the respective field resolves to null.

(
  $getInstanceSP := function($parentId) {
    $filter(
      $[type = "FamilyInstance" and parent.id = $parentId][0].**[ref = "Parameter"],
      function($p) {
        $count($match($getSharedParamName($p.id), /^(eV|eE)/)) = 0
      }
    ).{
        "name": $getSharedParamName($.id),
        "value": value,
        "guid": $getSharedParamGuid($.id),
    }
  };
)