<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Method to get Custom Entity Properties thru API in Vault Customization Forum</title>
    <link>https://forums.autodesk.com/t5/vault-customization-forum/method-to-get-custom-entity-properties-thru-api/m-p/13316927#M1501</link>
    <description>&lt;P&gt;Hi Markus,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My apologies. That's what I tried first, and I got the same error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;        elseif ($customObject._NewState -eq "Approved" -and $customObject._State -eq "Review"){
            $subject = "An RTE State was Changed: "
            $body = "An RTE was just Approved: " + $RTENumber
            $RTECreatorEmail=mGetCustentPropValue($customObject.Id, "RTE_Creator")&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="J_Dumont_0-1739447749614.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1466420i7AC803031EBB9B8E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="J_Dumont_0-1739447749614.png" alt="J_Dumont_0-1739447749614.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am able to show I have a value for $CustomObject.Id as shown below.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="J_Dumont_1-1739448254944.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1466425i26A21C7183434CC1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="J_Dumont_1-1739448254944.png" alt="J_Dumont_1-1739448254944.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="J_Dumont_2-1739448280840.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1466426iAF2060FBD59F3DE7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="J_Dumont_2-1739448280840.png" alt="J_Dumont_2-1739448280840.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Feb 2025 12:05:29 GMT</pubDate>
    <dc:creator>J_Dumont</dc:creator>
    <dc:date>2025-02-13T12:05:29Z</dc:date>
    <item>
      <title>Method to get Custom Entity Properties thru API</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/method-to-get-custom-entity-properties-thru-api/m-p/12180920#M1494</link>
      <description>&lt;P&gt;How do I get Custom Object Properties in Powershell with PowerVault using API call.&lt;/P&gt;&lt;P&gt;I have looked thru SDK documentation and could not find in CustomEntityService any Methods that let me get the Properties of the Custom Object and their Values.&lt;/P&gt;&lt;P&gt;Interestingly, there is UpdateCustomEntity method to update Custom Objects. But before Update&amp;nbsp; I would like to check if update is required.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 16:42:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/method-to-get-custom-entity-properties-thru-api/m-p/12180920#M1494</guid>
      <dc:creator>Eli_Dexter</dc:creator>
      <dc:date>2023-08-18T16:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: Method to get Custom Entity Properties thru API</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/method-to-get-custom-entity-properties-thru-api/m-p/12185264#M1495</link>
      <description>&lt;P&gt;If you are using coolOrange powerVault, you can get the file like this and then get the property needed:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# get the file&lt;/P&gt;&lt;P&gt;$file = Get-VaultFile -File '$/Designs/Part01.ipt'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# get the property needed&lt;BR /&gt;$propCustom = $file.'CustomPropName'&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Check here:&amp;nbsp;&lt;A href="https://doc.coolorange.com/projects/powervault/en/stable/code_reference/commandlets/" target="_blank"&gt;https://doc.coolorange.com/projects/powervault/en/stable/code_reference/commandlets/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Items are a similar method. Check the commandlet reference with the link above.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 13:00:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/method-to-get-custom-entity-properties-thru-api/m-p/12185264#M1495</guid>
      <dc:creator>dave_taylor</dc:creator>
      <dc:date>2023-08-21T13:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Method to get Custom Entity Properties thru API</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/method-to-get-custom-entity-properties-thru-api/m-p/12185652#M1496</link>
      <description>&lt;P&gt;The question was not about file properties but &lt;U&gt;Custom Object&lt;/U&gt; properties. Unfortunately, CoolOrange practically does not support Custom Objects.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 15:03:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/method-to-get-custom-entity-properties-thru-api/m-p/12185652#M1496</guid>
      <dc:creator>Eli_Dexter</dc:creator>
      <dc:date>2023-08-21T15:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Method to get Custom Entity Properties thru API</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/method-to-get-custom-entity-properties-thru-api/m-p/12185668#M1497</link>
      <description>&lt;P&gt;You can retrieve properties of custom objects as shown here:&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;#retrieve property value given by displayname from Custom Object (ID)
function mGetCustentPropValue ([Int64] $mCentID, [STRING] $mDispName)
{
	$PropDefs = $vault.PropertyService.GetPropertyDefinitionsByEntityClassId("CUSTENT")
	$propDefIds = @()
	$PropDefs | ForEach-Object {
		$propDefIds += $_.Id
	} 
	$mPropDef = $propDefs | Where-Object { $_.DispName -eq $mDispName}
	$mEntIDs = @()
	$mEntIDs += $mCentID
	$mPropDefIDs = @()
	$mPropDefIDs += $mPropDef.Id
	$mProp = $vault.PropertyService.GetProperties("CUSTENT",$mEntIDs, $mPropDefIDs)
	$mProp | Where-Object { $mPropVal = $_.Val }
	Return $mPropVal
}&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 21 Aug 2023 15:07:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/method-to-get-custom-entity-properties-thru-api/m-p/12185668#M1497</guid>
      <dc:creator>Markus.Koechl</dc:creator>
      <dc:date>2023-08-21T15:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: Method to get Custom Entity Properties thru API</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/method-to-get-custom-entity-properties-thru-api/m-p/12185862#M1498</link>
      <description>Thanks</description>
      <pubDate>Mon, 21 Aug 2023 16:17:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/method-to-get-custom-entity-properties-thru-api/m-p/12185862#M1498</guid>
      <dc:creator>Eli_Dexter</dc:creator>
      <dc:date>2023-08-21T16:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: Method to get Custom Entity Properties thru API</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/method-to-get-custom-entity-properties-thru-api/m-p/13316072#M1499</link>
      <description>&lt;P&gt;Hi Markus,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use the code in your example but getting errors. Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;The code needs to retrieve a UDP from the custom object called "RTE_Creator." In this case, it's an email that I will use to send an email.&lt;/P&gt;&lt;P&gt;Here's my function:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;#retrieve property value given by displayname from Custom Object (ID)
function mGetCustentPropValue ([Int64] $mCentID, [STRING] $mDispName)
{
	$PropDefs = $vault.PropertyService.GetPropertyDefinitionsByEntityClassId("CUSTENT")
	$propDefIds = @()
	$PropDefs | ForEach-Object {
		$propDefIds += $_.Id
	} 
	$mPropDef = $propDefs | Where-Object { $_.DispName -eq $mDispName}
	$mEntIDs = @()
	$mEntIDs += $mCentID
	$mPropDefIDs = @()
	$mPropDefIDs += $mPropDef.Id
	$mProp = $vault.PropertyService.GetProperties("CUSTENT",$mEntIDs, $mPropDefIDs)
	$mProp | Where-Object { $mPropVal = $_.Val }
	Return $mPropVal
}&lt;/LI-CODE&gt;&lt;LI-CODE lang="general"&gt;        elseif ($customObject._NewState -eq "Approved" -and $customObject._State -eq "Review"){
            $subject = "An RTE State was Changed: "
            $body = "An RTE was just Approved: " + $RTENumber
            $RTECreatorEmail=mGetCustentPropValue($customObject, "RTE_Creator")&lt;/LI-CODE&gt;&lt;P&gt;Here's the error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="J_Dumont_0-1739410333803.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1466275i96A3BC2DE5450F37/image-size/medium?v=v2&amp;amp;px=400" role="button" title="J_Dumont_0-1739410333803.png" alt="J_Dumont_0-1739410333803.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 01:35:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/method-to-get-custom-entity-properties-thru-api/m-p/13316072#M1499</guid>
      <dc:creator>J_Dumont</dc:creator>
      <dc:date>2025-02-13T01:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: Method to get Custom Entity Properties thru API</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/method-to-get-custom-entity-properties-thru-api/m-p/13316351#M1500</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/533605"&gt;@J_Dumont&lt;/a&gt;,&amp;nbsp;you need to hand over the custom objects Id, not the custom object.&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;$RTECreatorEmail=mGetCustentPropValue($customObject.Id, "RTE_Creator")&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 13 Feb 2025 06:41:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/method-to-get-custom-entity-properties-thru-api/m-p/13316351#M1500</guid>
      <dc:creator>Markus.Koechl</dc:creator>
      <dc:date>2025-02-13T06:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: Method to get Custom Entity Properties thru API</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/method-to-get-custom-entity-properties-thru-api/m-p/13316927#M1501</link>
      <description>&lt;P&gt;Hi Markus,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My apologies. That's what I tried first, and I got the same error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;        elseif ($customObject._NewState -eq "Approved" -and $customObject._State -eq "Review"){
            $subject = "An RTE State was Changed: "
            $body = "An RTE was just Approved: " + $RTENumber
            $RTECreatorEmail=mGetCustentPropValue($customObject.Id, "RTE_Creator")&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="J_Dumont_0-1739447749614.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1466420i7AC803031EBB9B8E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="J_Dumont_0-1739447749614.png" alt="J_Dumont_0-1739447749614.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am able to show I have a value for $CustomObject.Id as shown below.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="J_Dumont_1-1739448254944.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1466425i26A21C7183434CC1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="J_Dumont_1-1739448254944.png" alt="J_Dumont_1-1739448254944.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="J_Dumont_2-1739448280840.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1466426iAF2060FBD59F3DE7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="J_Dumont_2-1739448280840.png" alt="J_Dumont_2-1739448280840.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 12:05:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/method-to-get-custom-entity-properties-thru-api/m-p/13316927#M1501</guid>
      <dc:creator>J_Dumont</dc:creator>
      <dc:date>2025-02-13T12:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: Method to get Custom Entity Properties thru API</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/method-to-get-custom-entity-properties-thru-api/m-p/13317119#M1502</link>
      <description>&lt;P&gt;I wonder how the error could be the same if $mCentID is the custom entity (object) or the ID (int64).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 13:25:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/method-to-get-custom-entity-properties-thru-api/m-p/13317119#M1502</guid>
      <dc:creator>Markus.Koechl</dc:creator>
      <dc:date>2025-02-13T13:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: Method to get Custom Entity Properties thru API</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/method-to-get-custom-entity-properties-thru-api/m-p/13317432#M1503</link>
      <description>&lt;P&gt;If you are using powerShell, send the variables to the function like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;$RTECreatorEmail = mGetCustentPropValue $customObject.Id "RTE_Creator"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Don't use the parenthesis when calling the function with variables. I tried this and it works as it should for you...&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 15:27:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/method-to-get-custom-entity-properties-thru-api/m-p/13317432#M1503</guid>
      <dc:creator>dave_taylor</dc:creator>
      <dc:date>2025-02-13T15:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Method to get Custom Entity Properties thru API</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/method-to-get-custom-entity-properties-thru-api/m-p/13317587#M1504</link>
      <description>&lt;P&gt;Hi Dave,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, your solution worked great.!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you both for replying so quickly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 16:20:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/method-to-get-custom-entity-properties-thru-api/m-p/13317587#M1504</guid>
      <dc:creator>J_Dumont</dc:creator>
      <dc:date>2025-02-13T16:20:49Z</dc:date>
    </item>
  </channel>
</rss>

