CAD[SolidWorks]
SetDimensionValue
Calling Sequence
Parameters
Options
Description
Examples
SetDimensionValue(p, r)
p
-
handle to a SolidWorks document
r
equation of the form d=v where d is a dimension name and v is a value, or a list of such names
configuration : string; a configuration
The SetDimensionValue command sets the value(s) of the specified dimension(s) in active configuration of the SolidWorks document.
If the configuration option is specified, then the SetDimensionValue command sets the values in the specified configuration.
with⁡CADSolidWorks:
OpenConnection⁡:
doc≔OpenDocument⁡c:/mypart.sldprt:
GetActiveConfiguration⁡doc
Config1
GetConfigurationList⁡doc
Config1,Config2
SetDimensionValue⁡doc,D1@Sketch1@mypart.Part=200
SetDimensionValue⁡doc,D1@Sketch1@mypart.Part=200,configuration=Config2
SetDimensionValue⁡doc,D1@Sketch2@mypart.Part=150,D1@Sketch3@mypart.Part=250
UpdateDocument⁡doc
CloseDocument⁡doc
CloseConnection⁡:
See Also
Download Help Document