Message 1 of 4

Not applicable
07-31-2018
03:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to update value of G_L for every part in an assembly
illogic searches each part for parameter G_L and if the value = 914, then I want to update it to 950.
the code comes up with error 'cant find parameter G_L'
this is it:
any help?
Version:1.0 StartHTML:00000145 EndHTML:00003082 StartFragment:00000294 EndFragment:00003050 StartSelection:00000294 EndSelection:00000294SyntaxEditor Code Snippet
'Define the open document Dim openDoc As Document openDoc = ThisApplication.ActiveDocument 'Look at all of the files referenced in the open document Dim partDoc As Document For Each partDoc In openDoc.AllReferencedDocuments 'look at only part files If partDoc.DocumentType = kPartDocumentObject Then Dim userParam As UserParameter For Each userParam In partDoc.ComponentDefinition.Parameters.UserParameters If Parameter("G_L") = 914 Then Parameter("G_L") = 950 End If Next partDoc.Update End If Next iLogicVb.UpdateWhenDone = True
Sandy
Solved! Go to Solution.