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.
withCADSolidWorks:
OpenConnection:
doc≔OpenDocumentc:/mypart.sldprt:
GetActiveConfigurationdoc
Config1
GetConfigurationListdoc
Config1,Config2
SetDimensionValuedoc,D1@Sketch1@mypart.Part=200
SetDimensionValuedoc,D1@Sketch1@mypart.Part=200,configuration=Config2
SetDimensionValuedoc,D1@Sketch2@mypart.Part=150,D1@Sketch3@mypart.Part=250
UpdateDocumentdoc
CloseDocumentdoc
CloseConnection:
See Also
Download Help Document