CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 8591

CAD tip CAD tip # 13852:

   
Question CAD 
 %  platform  category 
Q - question

How to bulk-update all model parameters?

A - answer If you have a parametric design in Autodesk Inventor with a number of separate (independent) parameters, you can update these parameters in bulk using an iLogic rule.

The example in the following iLogic code rounds all numeric parameters starting with "d" (and not calculated from other parameters) to two decimal places. Metric parameters are assumed.

For Each param As Inventor.Parameter In ThisDoc.Document.ComponentDefinition.Parameters
  If param.Name.StartsWith("d",False) Then 'starts with d
    If param.DrivenBy.Count = 0 Then ' not computed
      If param.Units<>"Text" And param.Units<>"Boolean" Then 'numeric only
        Try
          param.Value = Math.Round(param.Value, 2) 'process, e.g. round to 2 decimals
        Catch
        End Try
      End If
    End If
  End If
Next
Inventor
100% *  CAD 
3.9.2023    21695×  
Prices - CAD eShop:
applies to: Inventor ·

See also:
Tip 13911:How to print all sheets at once from Inventor?
Tip 13836:How to reset view numbering in Inventor?
Tip 13744:Simple password protection of Inventor documents (iLogic).
Tip 13197:How to transfer a model or sketch parameter to iProperties?
Tip 12508:How to assign an expression (not value) to a user parameter with iLogic?


Back   All CAD Tips



Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   



Featuring:
Increase your productivity with our set of BIM add-on functions for Autodesk Revit
CADstudio Revit Tools More info


Please use these tips at your own risk.
Arkance Systems is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist