CAD[SolidWorks] - Maple Programming Help

Home : Support : Online Help : Connectivity : CAD Package : SolidWorks : CAD/SolidWorks/SetDimensionValue

 SetDimensionValue

 Calling Sequence SetDimensionValue(p, r)

Parameters

 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

Options

 • configuration : string; a configuration

Description

 • 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.

Examples

 > $\mathrm{with}\left(\mathrm{CAD}[\mathrm{SolidWorks}]\right):$
 > $\mathrm{OpenConnection}\left(\right):$
 > $\mathrm{doc}≔\mathrm{OpenDocument}\left("c:/mypart.sldprt"\right):$
 > $\mathrm{GetActiveConfiguration}\left(\mathrm{doc}\right)$
 ${"Config1"}$ (1)
 > $\mathrm{GetConfigurationList}\left(\mathrm{doc}\right)$
 $\left[{"Config1"}{,}{"Config2"}\right]$ (2)
 > $\mathrm{SetDimensionValue}\left(\mathrm{doc},"D1@Sketch1@mypart.Part"=200\right)$
 > $\mathrm{SetDimensionValue}\left(\mathrm{doc},"D1@Sketch1@mypart.Part"=200,\mathrm{configuration}="Config2"\right)$
 > $\mathrm{SetDimensionValue}\left(\mathrm{doc},\left["D1@Sketch2@mypart.Part"=150,"D1@Sketch3@mypart.Part"=250\right]\right)$
 > $\mathrm{UpdateDocument}\left(\mathrm{doc}\right)$
 > $\mathrm{CloseDocument}\left(\mathrm{doc}\right)$
 > $\mathrm{CloseConnection}\left(\right):$

 Please add your Comment (Optional) E-mail Address (Optional) What is ? This question helps us to combat spam