利用可能: Feature Studio
Feature Studio は、カスタムフィーチャーを定義するプログラミング言語 FeatureScript を操作するための Onshape のタブです。
Onshape が設計した FeatureScript は、フィーチャーの作成や 3D パラメトリックモデルの操作を目的としています。この言語は Onshape に組み込まれており、Onshape の標準的なフィーチャー (押し出し、フィレット、シェルなど) の定義を含む、Part Studio モデリングの基礎を提供します。
このページでは、Feature Studio のユーザーインターフェイスの操作について説明します。
- カスタムフィーチャーを作成するための FeatureScript の記述については、FeatureScript のドキュメントを参照してください。
- これらのカスタムフィーチャーを Part Studio に追加する方法については、カスタムフィーチャーを参照してください。
The Feature Studio toolbar includes the following:
- Undo (
; ctrl/cmd+z ) - Undo the most recent change. - Redo (
; ctrl+y/shift+cmd+z ) - Repeat or redo the most recent change. - New feature (
) - Insert the basic framework for a new feature, which consists of a function declaration with the precondition and body within it. See the FeatureScript Docs for more information. - Parameters and functions lists - Insert the basic framework for parameters, queries, evaluations, math functions, sketch functions, and operations. On some screens, this option is collapsed into one list (as shown above); on other screens, each list is individual:
- Insert feature parameters
- Insert query functions
- Insert evaluation functions
- Insert math functions
- Insert sketch functions
- Insert operation functions
- Import (
) - Import a file, Part Studio, other Feature Studio, or Variable Studio from the current or another document. See Imports.- You can also create a version (
) and view the version graph (
) from this dialog. See Versions and History.
- You can also create a version (
- Format Studio (
) - Automatically format the current FeatureScript code. If this option is not visible on the toolbar, click the Import dropdown and select it from the menu. - Commit - Commit the current code changes. See Committing FeatureScript changes on this page.
- Search tools ( alt/option+c ) - Search for any of the parameters and functions available in the Parameters and functions lists, including their descriptions. To close the search box, click Close search, press the escape key, or click outside the box.
- Co-complete (
) - Use AI to help write FeatureScript code. See FeatureScript Co-Complete. - Monitor Part Studio (
) - Monitor a Part Studio's execution. See Debugging in Feature Studios.- Click the dropdown and select Profile Part Studio (
) to profile a Part Studio's execution. See Debugging in Feature Studios.
- Click the dropdown and select Profile Part Studio (
- Module outline (
) - Navigate through your FeatureScript code. See Navigating the outline on this page. - Back reference (
; ctrl/cmd+[ ) - Return your cursor to its previous position in your navigation history. - Forward reference (
; ctrl/cmd+] ) - Return your cursor to the next position in your navigation history. - Line - The line number of the current cursor location.
- Column - The column number of the current cursor location.
Onshape のすべてのタブと同様に、FeatureScript の変更は入力時に自動的に保存されます。変更をコミットして新しい FeatureScript コードをドキュメント全体に適用するには、[コミット] ボタンをクリックします。
-
現在の Feature Studio のみの変更をコミットするには、[コミット] ボタンをクリックします。
-
ドロップダウンをクリックし、メニューから [コミット] を選択することもできます。
-
cmd/ctrl + s を押すこともできます。
-
-
ドキュメント内のすべての Feature Studio のすべての変更をコミットするには、[コミット] ボタンをクリックし、ドロップダウンから [すべてコミット] を選択します。
-
ドロップダウンメニューの括弧には、変更がコミットされていない Feature Studios の数が表示されます
-
cmd/ctrl + shift + s を押すこともできます。
-
-
メニューバーの [Feature Studio を検索] ボタン (
) をクリックし、テキスト検索ペインを開きます (上記を参照)。-
テキスト検索ペインは、ctrl/cmd + shift+ f を押して開くこともできます。
-
記号検索ペインを開くには、記号を右クリックし、コンテキストメニューの [ワークスペース内での使用状況を検索] または [ワークスペースの名前を変更] を選択します。

-
-
テキスト、記号、標準ライブラリインポートの検索を切り替えるには、検索モードのドロップダウンをクリックします。

-
(テキスト検索のみ) 検索文字列を [テキストを検索] フィールドに入力し、次の検索パラメータを任意で指定します。
-
大文字と小文字を区別する - チェックボックスを選択してオン/オフにします。
-
正規表現 - チェックボックスを選択してオン/オフにします。
-
Feature Studio 名フィルター - 入力したテキストと一致するタブに検索結果を絞り込みます。
-
-
(標準ライブラリインポートの検索のみ) 検索オプションを入力し、一致する標準ライブラリインポートを見つけます:
-
含める/除外: - バージョンとバージョン範囲をカンマで区切ったリストで入力します。インポートは、そのバージョンが除外リストではなく含めるリストに返された場合にのみ検索結果に表示されます。
-
マイナーバージョン (3081.2) を含めると、正確なバージョン (3081.2) のみが返されます。マイナーバージョン (3081) を除外すると、メジャーバージョン (3081.0 、3081.1、3081.2、3081.3) 内のすべてのマイナーバージョンが返されます。
-
バージョン範囲 (3081.0~3081.2) が含まれます。
-
ダッシュを使用して、前とそれを含むすべてのバージョン (-3081.2) またはそれ以降と含む (3081.2-a バージョン) すべてのバージョンを一致させます。
-
コンマで区切られた検索では、一致したものを組み合わせたものが返されます (たとえば、3079 - 3080、3081.2 は 3079 のすべてのマイナーバージョン、3080 のすべてのマイナーバージョン、および 3081.2 を返します)。
-
すべてと一致させるには、[含める] を空白のままにします。何も除外しない場合は 、[除外] を空のままにします。
-
-
Feature Studio 名フィルター - 入力したテキストと一致するタブに検索結果を絞り込みます。

-
-
[検索] をクリックします。
- 検索結果は FeatureScript コードで強調表示されます。
-
Feature Studio タブごとに結果を表示するには、展開 (
) ボタンと折りたたみ (
) ボタンを使用します。 -
すべての検索結果を展開または折りたたむには、[検索結果を展開する] (
) と [検索結果を折りたたむ] (
) ボタンを使用します。 -
検索結果をクリックすると、Feature Studio 内のその場所に移動します。
-
(オプション) 検索テキストの置換、シンボル名の変更、標準ライブラリインポートバージョンの更新を行うには、次の手順を実行します。
-
[検索モード] ボタンの左側にある置換を切り替える矢印 (
) をクリックします。 -
置換テキストを [置換] フィールド (テキストまたは記号検索) に入力するか、[バージョンを設定] フィールド (標準ライブラリ検索) に希望のバージョン番号を入力します。[バージョンを設定]ドロップダウンリストからサポートされているバージョンを選択することもできます。
-
[すべてを置換] (テキストまたはライブラリの検索) または [名前を変更] (記号検索) をクリックします。
-
Feature Studio のツールバーにあるモジュールの概要の矢印をクリックすると、概要が表示されます。また、次のこともできます。
-
検索結果をクリックして、FeatureScript コードの一部に移動します。
-
検索結果を絞り込むには、検索記号のフィールドに検索テキストを入力します。
ラーニングセンターに関するその他のリソースについては、こちらのインストラクター主導のトレーニングコース: 「FeatureScript の基礎 (Onshape アカウントが必要です)」をご覧ください。