06-16-2009 01:01 AM
Hello,
I'm trying to customize a Type.ini file in TestStand (4.0) with LabVIEW (8.5). I'd like adding/removing a substep to each created step type.
The method 'AddSubStep' is OK, my type.ini is updated.
But, before creating a new substep, i'd like removing all previous but an error is generated:
"Error -17331 occurred at Item is locked, protected, or in use and cannot be deleted."
I don't find a solution to remove the protection. Why can i add a new substep and can't remove it after?
thank you for your responses
Solved! Go to Solution.
06-18-2009 03:52 AM
Hi,
I advise you to read this: NI TestStand Type Management Best Practices
Regards,
Aurélien J.
National Instruments France
06-19-2009 01:02 PM
What API are you using to remove the substeps?
-Doug
06-19-2009 02:29 PM
YR42,
There appears to be an issue with the RemoveSubstep() method of the API. As a workaround you can use the following expression or equivalent API calls instead:
Locals.StepTypeReference.AsPropertyObject.GetPropertyObject("Substeps", 0).DeleteElements(0, 1, PropOption_OverrideNotDeletable)
We will look into this issue with the StepType.RemoveSubstep() method. Thank you for bringing this to our attention. Also, you might still want to read the document Aurelien posted a link to if you haven't already as it might contain information that is helpful to you.
Hope this helps,
-Doug
06-22-2009 07:47 AM - edited 06-22-2009 07:53 AM
Hello,
Yes doug your workaround works fine.
YR42 in attachment you can find an example with 2 methods.
1) The expression
2) Active-X steps (this will be helpfull using Labview).
Regards,
Nacer M. | Certified LabVIEW Architecte