When creating a configurable assembly using iLogic, you’ll
often need to push iProperties down to the part files in your assembly. Quite often these are project specific
iProperties such as Project Number, Client Name, Sales Order, etc.
Writing a separate line to push the iProperty down to each component in your assembly is not a very efficient way of going about it.
Another way of accomplishing this is creating an Array whose
values include the components in your assembly and a For Next loop.
iPropArray = New String(){"Sideframe_RH", "Sideframe_LH", "End_Guard"}
For Each part In iPropArray
iProperties.Value(part, "Custom", "SO_Number") = Sales_Order_Number
iProperties.Value(part, "Custom", "Company") = Customer_Name
iProperties.Value(part, "Project", "Project") = Project_Description
Next
The Array values are the browser node names of the
components in the assembly.
Inside the For Next loop are the actions you want done to
each part in the array. In this case, I’m
pushing down iProperties but with a little imagination, you can see how you
could expand on this.
Now if I were reading this, I’d say “But Randy, what if I
don’t want to list out all the parts. I
want to do the same action to all the parts in my assembly”. My answer to myself would be “Yes you can do
that Randy…but you’ll have to wait until the next post.
Randy
Randy
"Nothing can stop the man with the right mental attitude from achieving his goal; nothing on earth can help the man with the wrong mental attitude." - Thomas Jefferson
No comments:
Post a Comment