Showing results for 
Search instead for 
Did you mean: 

Change Status Addin

Valued Contributor
Valued Contributor

I´m deploying an adding to update 3dstyles of parts and assemblies using Jason Newell wizard but I need to change the status of released parts. I know how to do it but I need to close the part to change status and then reopen it. I ´m kind of newbie with addins and I don´t know how to reopen the part to avoid losing the reference to the document object. 


Another way to do it could be overriding status check on save, is it posible?


Summing it up, what is the best way to change document status in an addin?


Any idea?


Best wishes

Ramon Ruiz


Re: Change Status Addin


 Have you tried to set the document status directly? It looks like to set the status to available the line would be:


DocumentObject.Status =DocumentStatus.igStatusAvailable

The enumeration for the statuses (statii ...?) are here:

Namespace SolidEdgeFramework
    Public Enum DocumentStatus
        igStatusAvailable = 0
        igStatusInWork = 1
        igStatusInReview = 2
        igStatusReleased = 3
        igStatusBaselined = 4
        igStatusObsolete = 5
        igStatusUnknown = 6
    End Enum
End Namespace


Alternatively, could you stash the path and open/assign the part to your variable afterwards?

Dim path as string = appObject.ActiveDocument.FullName
'change status through known ways...

DocumentObject = appObject.Documents.Open(path)
ST9 MP10
VS2017 VB.Net & C#