Modify Dimension Properties Example (C#)
This example shows how to modify the properties of a selected dimension.
//----------------------------------------------------------------------------
// Preconditions:
// 1. Open a model document with a dimension.
// 2. Select the dimension.
//
// Postconditions: The properties of the selected dimension are modified
// as specified.
//
---------------------------------------------------------------------------
using
SolidWorks.Interop.sldworks;
using
SolidWorks.Interop.swconst;
using
System.Runtime.InteropServices;
using
System;
namespace
ModifyDimensionProperties_CSharp.csproj
{
partial
class
SolidWorksMacro
{
ModelDoc2
Part;
bool
boolstatus;
public
void Main()
{
Part = (ModelDoc2)swApp.ActiveDoc;
boolstatus = Part.EditDimensionProperties3(1, 0, 0,
"",
"",
true, 9, 2,
true, 1,
1, "",
"",
true,
"",
"",
true, 1,
"");
Part.ClearSelection2(true);
}
public
SldWorks
swApp;
}
}