CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products []
CZ | EN | DE
Login or
  Visitors: 5480

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
          param.Value = Math.Round(param.Value, 2) 'process, e.g. round to 2 decimals
        End Try
      End If
    End If
  End If
100% *  CAD 
3.9.2023    853×  
Prices - CAD eShop:
applies to: Inventor ·

See also:
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?
Tip 12462:Mass- (table-) rename parameters in Inventor.

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   

Publish interactive 3D PDF models from AutoCAD, Inventor or Revit with Share3D 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.