<?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: Create new CustomObject in Vault Customization Forum</title>
    <link>https://forums.autodesk.com/t5/vault-customization-forum/create-new-customobject/m-p/9266532#M4401</link>
    <description>&lt;P&gt;You can create any custom object once you know the id of the custom object definition. The concept is getting the definition ID, creating the new object and finally adding property values.&lt;/P&gt;
&lt;P&gt;Compare the sample to create custom objects "Task":&lt;/P&gt;
&lt;PRE&gt;#region Create Task
	$mCustentDefId = ($vault.CustomEntityService.GetAllCustomEntityDefinitions() | Where-Object { $_.DispName -eq "Task"}).Id
	$mCustentName =$JobAttributes.Number
	$mNewCustent = $vault.CustomEntityService.AddCustomEntity($mCustentDefId , $mCustentName)
	
	$propInstParamArray = New-Object Autodesk.Connectivity.WebServices.PropInstParamArray
	$CustentPropDefs = $vault.PropertyService.GetPropertyDefinitionsByEntityClassId("CUSTENT")

	#create property def.id/value pairs 
	#ToDo: replace by looping the Attributes
	$propInstParam = New-Object Autodesk.Connectivity.WebServices.PropInstParam
	$propInstParam.PropDefId = ($CustentPropDefs | Where-Object { $_.DispName -eq "Title"}).Id
	$propInstParam.Val = $JobAttributes.Title
	$propInstParamArray.Items += $propInstParam

	$propInstParam = New-Object Autodesk.Connectivity.WebServices.PropInstParam
	$propInstParam.PropDefId = ($CustentPropDefs | Where-Object { $_.DispName -eq "Description"}).Id
	$propInstParam.Val = $JobAttributes.Description
	$propInstParamArray.Items += $propInstParam

$vault.CustomEntityService.UpdateCustomEntityProperties(@($mNewCustent.Id), $propInstParamArray)&lt;/PRE&gt;</description>
    <pubDate>Wed, 22 Jan 2020 10:40:39 GMT</pubDate>
    <dc:creator>Markus.Koechl</dc:creator>
    <dc:date>2020-01-22T10:40:39Z</dc:date>
    <item>
      <title>Create new CustomObject</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/create-new-customobject/m-p/9266370#M4400</link>
      <description>&lt;P&gt;Is it possible to create a new CustomObject through the API?&lt;/P&gt;&lt;P&gt;Going through the Object Browser, it looks like its only possible to create a CustomObjectDefinition (&lt;FONT&gt;AddCustomObjectDefinition&lt;/FONT&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2020 09:24:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/create-new-customobject/m-p/9266370#M4400</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-22T09:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: Create new CustomObject</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/create-new-customobject/m-p/9266532#M4401</link>
      <description>&lt;P&gt;You can create any custom object once you know the id of the custom object definition. The concept is getting the definition ID, creating the new object and finally adding property values.&lt;/P&gt;
&lt;P&gt;Compare the sample to create custom objects "Task":&lt;/P&gt;
&lt;PRE&gt;#region Create Task
	$mCustentDefId = ($vault.CustomEntityService.GetAllCustomEntityDefinitions() | Where-Object { $_.DispName -eq "Task"}).Id
	$mCustentName =$JobAttributes.Number
	$mNewCustent = $vault.CustomEntityService.AddCustomEntity($mCustentDefId , $mCustentName)
	
	$propInstParamArray = New-Object Autodesk.Connectivity.WebServices.PropInstParamArray
	$CustentPropDefs = $vault.PropertyService.GetPropertyDefinitionsByEntityClassId("CUSTENT")

	#create property def.id/value pairs 
	#ToDo: replace by looping the Attributes
	$propInstParam = New-Object Autodesk.Connectivity.WebServices.PropInstParam
	$propInstParam.PropDefId = ($CustentPropDefs | Where-Object { $_.DispName -eq "Title"}).Id
	$propInstParam.Val = $JobAttributes.Title
	$propInstParamArray.Items += $propInstParam

	$propInstParam = New-Object Autodesk.Connectivity.WebServices.PropInstParam
	$propInstParam.PropDefId = ($CustentPropDefs | Where-Object { $_.DispName -eq "Description"}).Id
	$propInstParam.Val = $JobAttributes.Description
	$propInstParamArray.Items += $propInstParam

$vault.CustomEntityService.UpdateCustomEntityProperties(@($mNewCustent.Id), $propInstParamArray)&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Jan 2020 10:40:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/create-new-customobject/m-p/9266532#M4401</guid>
      <dc:creator>Markus.Koechl</dc:creator>
      <dc:date>2020-01-22T10:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: Create new CustomObject</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/create-new-customobject/m-p/9266640#M4402</link>
      <description>&lt;P&gt;Thanks Markus - I will give it a try:-)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But please enligthen me. What is the difference between a CustomEntity and a CustomObject?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Michael&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2020 11:43:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/create-new-customobject/m-p/9266640#M4402</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-22T11:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Create new CustomObject</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/create-new-customobject/m-p/9266775#M4403</link>
      <description>&lt;P&gt;It is the same; Custom Object is the name in the user interface, Custom Entity is the name in the API.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2020 12:37:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/create-new-customobject/m-p/9266775#M4403</guid>
      <dc:creator>Markus.Koechl</dc:creator>
      <dc:date>2020-01-22T12:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: Create new CustomObject</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/create-new-customobject/m-p/9267282#M4404</link>
      <description>&lt;P&gt;I am trying to convert the ps to vb, but run into trouble, when creating the parameter array object.&lt;/P&gt;&lt;P&gt;The .Items is nothing, which causes a runtime error. What am I missing here?&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;Dim iCustEnt(0) As Long&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iCustEnt(0) = connection.WebServiceManager.CustomEntityService.AddCustomEntity(3, "My great custom object").Id&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oParams(0) As PropInstParamArray&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oParams(0) = New PropInstParamArray&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each oPropDef As PropDef In connection.WebServiceManager.PropertyService.GetPropertyDefinitionsByEntityClassId("CUSTENT")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If oPropDef.DispName = "CC GroupId" Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oPropParam As New PropInstParam&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oPropParam.PropDefId = oPropDef.Id&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oPropParam.Val = "myVal1"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim i As Int16 = oParams(0).Items.Count ' Fails in this line&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oParams(0).Items.Append(oPropParam)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; connection.WebServiceManager.CustomEntityService.UpdateCustomEntityProperties(iCustEnt, oParams)&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;-------&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;Before spending too much time on this track, I would like to know if using CustomObjects is a good idea? Asking because it seems the api is unsupported.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;I want to use the Vault list to control the jobprocessor. ie, when a custom object is approved, it should trigger the JobProcessor to start an action.&lt;/P&gt;&lt;P&gt;Instead of using a Custom Object, I could also just use a folder with "dummyfiles", as the API to handle files looks more mature?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&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;&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2020 15:14:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/create-new-customobject/m-p/9267282#M4404</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-22T15:14:56Z</dc:date>
    </item>
  </channel>
</rss>

