Products updater

When you modify the geometry, properties, or behaviors of a template component for a product, you need to manually clear the product’s component URI and then reassign the component. With this add-on, you can automatically update it with a single click

Please note that this method is only effective for product component URIs that start with ‘component:’,

UpdateProducts

Unzip to C:\Users\<User name>\Documents\Visual Components\4.10\My Commands\Python 2
UpdateProducts.zip (974 Bytes)

If you don’t even want to press a button, you can create a new component, write this script into it, and it will automatically update every time the simulation starts.

from vcScript import *

product_type_manager = getSimulation().ProcessController.ProductTypeManager

def OnStart():  
  for product_type in product_type_manager.ProductTypes:
    if product_type.IsSystem or product_type.IsAssembly:
      continue
    
    if "component:" in product_type.ComponentUri:
      component_uri = product_type.ComponentUri
      product_type.ComponentUri = ""
      product_type.ComponentUri = component_uri
 
6 Likes

Neat tool! Added it to Addon Store.
Still hope for a better out of the box solution. Updating products is a bit of a hurdle for beginners.

1 Like