🔩
よく使う Solidworks API まとめ (1) プロパティと関数
Namespace:SolidWorks.Interop.sldworks
AssemblyDoc
| Method | |
|---|---|
| GetComponents | AssemblyDoc のアクティブな Configuration のすべての Component を取得 |
| ReplaceComponents2 | 選択した 1 つ以上の Component を別のモデルに置き換え |
BomFeature
| Property | |
|---|---|
| Configuration | 部品表の Configuration の名前を取得/設定 |
| TableType | 部品表のタイプを取得/設定 |
| Method | |
|---|---|
| GetConfigurations | この部品表で使用可能、もしくは使用されている Configuration を取得 |
| GetReferencedModelName | 部品表 Feature によって参照されるモデルの名前を取得 |
| GetTableAnnotations | 部品表 Feature の 部品表 TableAnnotation を取得 |
BomTableAnnotation
| Method | |
|---|---|
| GetComponents2 | BomTableAnnotation 内の指定の 行と Configuration の Component を取得 |
| GetComponentsCount2 | BomTableAnnotation 内の指定の 行と Configuration の Component 数、項目番号、部品番号を取得 |
Component2
| Property | |
|---|---|
| ComponentReference | Component の Component 参照を取得/設定 |
| Name2 | Component の名前を取得/設定 |
| ReferencedConfiguration | Component で使用されるアクティブな Configuration を取得/設定 |
| Method | |
|---|---|
| GetChildren | Component のすべての子 Component を取得 |
| Select4 | Component を選択 |
Configuration
| Property | |
|---|---|
| Name | Configuration の名前を取得/設定 |
| Method | |
|---|---|
| GetParameters | Configuration のパラメータ ( Feature の抑制状態、Component の抑制状態または表示、寸法など ) を取得 |
| IsDerived | Configuration が参照 Configuration であるかどうかを取得 |
| SetParameters | Configuration のパラメータ ( Feature の抑制状態、Component の抑制状態または表示、寸法など ) を設定 |
ConfigurationManager
| Property | |
|---|---|
| ActiveConfiguration | アクティブな Configuration を取得 |
Feature
| Method | |
|---|---|
| GetNextFeature | パーツ内の次の Feature を取得 |
| GetSpecificFeature2 | Feature のより具体的なインターフェースを取得 |
| GetTypeName | Feature のタイプを取得 |
ModelDoc2
| Property | |
|---|---|
| ConfigurationManager | ConfigurationManager を取得 |
| SelectionManager | SelectionMgr を取得 |
| SketchManager | SketchManager を取得 |
| Visible | ModelDoc の可視性を取得/設定 |
| Method | |
|---|---|
| AddConfiguration3 | ドキュメントに新しい Configuration を追加 |
| DeleteConfiguration2 | ドキュメントから Configuration を削除 |
| EditConfiguration3 | 指定された Configuration を編集 |
| FirstFeature | ドキュメントの最初の Feature を取得 |
| ForceRebuild3 | ドキュメントのアクティブな Configuration のすべての Feature の再構築を強制 |
| GetConfigurationByName | 指定された Configuration を取得 |
| GetConfigurationNames | ドキュメントの Configuration の名前を取得 |
| GetPathName | ファイル名を含むドキュメントのパスを取得 |
| GetTitle | アクティブウィンドウのタイトルバーに表示されるドキュメントのタイトル ( = ファイル名 ) を取得 |
| GetType | ドキュメントタイプを取得 |
| Save3 | 現在のドキュメントを保存 |
| SaveAs4 | アクティブなドキュメントを詳細オプション付きで指定した名前に保存 |
| ShowConfiguration2 | 指定された名前の Configuration をアクティブな Configuration に設定 |
SelectionMgr
| Method | |
|---|---|
| CreateSelectData | Select メソッドの引数として使用する SelectData を作成 |
| GetSelectedObject6 | 選択した Object を取得 |
| GetSelectedObjectCount2 | 選択した Object の数を取得 |
Sketch
| Method | |
|---|---|
| Is3D | Sketch が 2D か 3D かを取得 |
SketchLine
| Method | |
|---|---|
| GetEndPoint2 | SketchLine の終点の SketchPoint を取得 |
| GetStartPoint2 | SketchLine の始点の SketchPoint を取得 |
SketchManager
| Property | |
|---|---|
| ActiveSketch | アクティブな Sketch を取得 |
| Method | |
|---|---|
| CreateCenterLine | 指定された点の間に中心線を作成 |
SketchSegment
| Property | |
|---|---|
| ConstructionGeometry | SketchSegment が構築ジオメトリ ( Feature の回転操作の中心線など ) であるかどうかを取得/設定 |
| Method | |
|---|---|
| GetType | SketchSegment のタイプを取得 |
SldWorks
| Property | |
|---|---|
| ActiveDoc | アクティブなドキュメントを取得 |
| Method | |
|---|---|
| CloseDoc | 指定されたドキュメントを閉じる |
| GetUserPreferenceToggle | ドキュメントのユーザー設定値を取得 |
| OpenDoc6 | 既存のドキュメントを開く |
| SetUserPreferenceToggle | ドキュメントのユーザー設定値を取得 |
Discussion