- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, I was wondering if anyone can assist with the relevant coding required to generate a new Custom iProperty. I have a number of parts with all sorts of different iproperties and I want to do a clean up to only include for the ones in the MyArrayList. Therefore the purpose of the script is to perform a check of a existing custom iProperty set within the part and first of all add in the Custom iProperties that are missing then do another check then delete the unwanted custom iProperties that are not on the list. I have attached my current script and the problem area is on Line 102 as I um unable to create the missing iProperties from the MyArrayList. If anyone could assist that would be most appreciated. Format:HTML Format Version:1.0 StartHTML: 165 EndHTML: 43415 StartFragment: 314 EndFragment: 43383 StartSelection: 314 EndSelection: 314SyntaxEditor Code Snippet 'define list of custom properties to delete Dim MyArrayList As New ArrayList MyArrayList.add("Plant Item No.") MyArrayList.add("Sub Assembly No.") MyArrayList.add("Part No.") MyArrayList.add("Fabrication Item") MyArrayList.add("Security Classification of Model") MyArrayList.add("Configuration Management Category") MyArrayList.add("Master Model Location") MyArrayList.add("Revision and Version of Model") MyArrayList.add("Status of Issue") MyArrayList.add("Purpose of Model Issue") MyArrayList.add("Design Organisation") MyArrayList.add("Modelled By") MyArrayList.add("Level of Check") MyArrayList.add("Checked By") MyArrayList.add("Date of Check") MyArrayList.add("Approved By") MyArrayList.add("Date of Approval") MyArrayList.add("Accepted By") MyArrayList.add("Date of Acceptance") MyArrayList.add("Designers Project Number") MyArrayList.add("Designers Work Package Number") MyArrayList.add("Project Title") MyArrayList.add("Work Pack Title") MyArrayList.add("Equipment Title") MyArrayList.add("Site/Location") MyArrayList.add("Plant Title") MyArrayList.add("Building Number") MyArrayList.add("System No.") MyArrayList.add("Plant Area") MyArrayList.add("Department") MyArrayList.add("File Code") MyArrayList.add("Manufactured/Proprietary") MyArrayList.add("Design Quality Plan Reference No.") MyArrayList.add("Quality Grade of Item") MyArrayList.add("Item Description") MyArrayList.add("Item Designation") MyArrayList.add("Item Size Designation") MyArrayList.add("Material Designation") MyArrayList.add("Heat Treatment Designation") MyArrayList.add("Weld Standard Designation") MyArrayList.add("Non Destructive Testing Designation") MyArrayList.add("% Coverage of Non-Destructive Testing") MyArrayList.add("Protective Coating Designation") MyArrayList.add("Paint Designation") MyArrayList.add("Paint Colour Designation") MyArrayList.add("Identification Marking Designation") MyArrayList.add("Information Marking Designation") MyArrayList.add("FAT Testing Designation") MyArrayList.add("Manufacturing Specification No.") MyArrayList.add("Testing Specification No.") MyArrayList.add("Supplier Product Code") MyArrayList.add("Supplier") MyArrayList.add("Supplier Contact Details") MyArrayList.add("Extent of Scope") MyArrayList.add("Manufacturers Quality Plan No.") MyArrayList.add("Manufacturers Drawing No.") MyArrayList.add("Manufacturers Purchase Order Number") MyArrayList.add("Manufacturers Quote No.") MyArrayList.add("Is Certification of Goods Required?") MyArrayList.add("Type of Certification Required") MyArrayList.add("Order Date") MyArrayList.add("Date Due In") MyArrayList.add("Date Goods Received") MyArrayList.add("Recipient of Goods") MyArrayList.add("Goods Inward Inspection Complete") MyArrayList.add("Goods Storage Location") MyArrayList.add("Index Number") MyArrayList.add("Cast No.") MyArrayList.add("Page No.") MyArrayList.add("Manufacturing Location") MyArrayList.add("Manufacturing Status") MyArrayList.add("FAT Testing Status") MyArrayList.add("Technical Query Reference") MyArrayList.add("Production Permit Reference") MyArrayList.add("Concession Reference") MyArrayList.add("Verify Goods Inwards Inspection") MyArrayList.add("Verify Material Certificates") MyArrayList.add("Verify Consumable Certificates") MyArrayList.add("Verify Weld Procedure Approval") MyArrayList.add("Verify Welder Qualification Approval") MyArrayList.add("Verify NDT Procedure Approval") MyArrayList.add("Verify NDT Operator Approval") MyArrayList.add("Verify Paint Procedure Approval") MyArrayList.add("Verify In Process Inspection") MyArrayList.add("Conduct Visual Inspection") MyArrayList.add("Conduct Dimensional Inspection") MyArrayList.add("Verify NDT Inspection Completion") MyArrayList.add("Verify FAT Test Completion") MyArrayList.add("Sign off and Dispatch Release Note") 'define custom property collection oCustomPropertySet = ThisDoc.Document.PropertySets.Item("Inventor User Defined Properties") 'look at each property in the collection For Each oCustProp In oCustomPropertySet 'check property name against the list you don't want to delete If MyArrayList.Contains(oCustProp.Name) Then 'Skip Else 'Create a new iProperty if the existing custom iProperties doesn't contain the parameter in MyArrayList iProperties.Value(doc, "Custom", MyArrayList.Name) End If If MyArrayList.Contains(oCustProp.Name)Then 'skip it Else 'Delete the custom iProperty oCustProp.Delete End If Next
kelly.young has edited your subject line for clarity: iLogic Sript to Create New Custom iProperties from New Array List
Solved! Go to Solution.