I'm trying to write a small nxopen program to check in the current part.
I am using the following code to check in the part:
Dim parts_tocheckin(0) As BasePart parts_tocheckin(0) = nxs.Parts.Work Dim cii As New PdmPart.CheckinInput cii.AllowRemote = True cii.ExplicitCheckIn = True cii.IncludeSecondary = False Dim cie As OperationErrors cie = my_pdmpart.CheckinParts(parts_tocheckin, cii)
This works fine apart from I can't get any feedback to tell me if the operation succeeded or failed.
I've found this to check how many 'objects' are checked in/out:
Dim my_assy As ComponentAssembly = nxs.Parts.BaseWork.ComponentAssembly Dim co_list() As NXObject Dim uco_list() As NXObject my_assy.GetCheckedoutStatusOfObjects(co_list, uco_list)
I could use the object counts before and after to see if they've changed but if I have a large assy open another users check in at the same time could effect the outcome.
I've tried converting the NXobjects in the 2 lists to something like component or part so I can get it's name and compare to the part in the check in list but I can't convert the objects.
Am I missing something here or is there a simple way to get the check in/out status of a part?
As always thanks in advance for any help or advice.......
It's not particularly neat but I've found the log file stores feedback on the check in attempt:
Errors in checking in part tags
TCIN SOA operation object name: msb-checkin-test/01
Information: 942073, (TC 0): The part is not checked out
&MACRO MENU, 0, UG_HELP_SYSTEM_LOG UG_GATEWAY_MAIN_MENUBAR <UG_HELP> ## !