2015 R2 UpdateItemProperties

2015 R2 UpdateItemProperties

Anonymous
Not applicable
1,311 Views
3 Replies
Message 1 of 4

2015 R2 UpdateItemProperties

Anonymous
Not applicable

Hello,

 

I have problems upgrading my program to the 2015 R2 version.

I cannot fill the propInstParamArray correctly.

itemSvc.UpdateItemProperties(New Long() {itemRev.RevId}, propInstParamArray)

 

Is there anywhere good example of that?

 

Regards,

Kari L.

0 Likes
Accepted solutions (1)
1,312 Views
3 Replies
Replies (3)
Message 2 of 4

minkd
Alumni
Alumni

Here is a C# example that updates 1 property on 1 item:

 

items = svcmgr.ItemService.UpdateItemProperties(
    new long[] { itemRevId },
    new webobj.PropInstParamArray[] {
        new webobj.PropInstParamArray() {
            Items=new webobj.PropInstParam[] {
                new webobj.PropInstParam() { PropDefId=udpId, Val=udpValue }
                }
            }
        }
    );

 

-Dave



Dave Mink
Fusion Lifecycle
Autodesk, Inc.
Message 3 of 4

Anonymous
Not applicable
Accepted solution

Thank You,

 

This solves my problem.  And the code in VB:

Dim propInstParamArray As PropInstParamArray() = New PropInstParamArray() {New PropInstParamArray() With _

{.Items = New PropInstParam() {New PropInstParam() With {.PropDefId = udpId, .Val = udpValue}}}}

 

Regards,

Kari

Message 4 of 4

darius.simkunas
Advocate
Advocate

Hi,

I try migrate my 2015 aps to 2016.

In this example is update of 1 property, is it possible do this with array, like in 2015 version?

m_serviceManager.DocumentServiceExtensions.UpdateFolderProperties(ent_ids.ToArray(), prop_ids.ToArray(), prop_vals.ToArray());

regards

Darius

0 Likes