IClient インターフェース

IClient インターフェース

Overview 
IClient インターフェース(EDPInterfaces ユニットより)は、Altium Designer アプリケーションのシェルまたはサブシステムを表し、Client オブジェクトはコマンド(事前パッケージ化されたプロセスランチャー)、プロセスの深さ、ドキュメントなど多くのオブジェクトを管理します。Altium Designer にロードされたプラグインモジュールは、単一の実行可能サブシステムへのフックを持つため、特定のドキュメントやそれらのドキュメントに対する起動コマンドへアクセスできます。

IClient インターフェースおよびそのサブインターフェース:

• ICommandLauncher(プロセスランチャーを扱う)
• IProcessLauncher(プロセスの起動を扱う)
• IServerDocumentView(パネルやドキュメントを扱う)
• IProcessControl(積み重ねられたプロセスのレベルを決定する)
• IGUIManager(Altium Designer のユーザーインターフェース、パネルの位置や状態を扱う)
• IServerModule(Altium Designer でロードされたサーバーを扱う)
• INotification(サーバーや指定したプラグインへの通知メッセージのブロードキャストやディスパッチ)

IClient インターフェースオブジェクトは、Altium Designer SDK の EDPClasses ユニットにある Client 関数を呼び出すことで取得できます。


IClient Methods and Properties Table

IClient methods 
AddServerView
AddViewToFavorites
ApplicationIdle
BeginDisableInterface
BeginDocumentLoad
BeginRecoverySave
BroadcastNotification
CanServerStarted
CloseDocument
DispatchNotification
EndDisableInterface
EndDocumentLoad
EndRecoverySave
GetApplicationHandle
GetCommandLauncher
GetCount
GetCurrentView
GetDefaultExtensionForDocumentKind
GetDocumentByPath
GetDocumentKindFromDocumentPath
GetDynamicHelpManager
GetEncryptedTechnologySets
GetGUIManager
GetMainWindowHandle
GetNavigationSystem
GetOptionsSet
GetOptionsSetByName
GetOptionsSetCount
GetPanelInfoByName
GetProcessControl
GetRealMainWindowHandle
GetServerModule
GetServerModuleByName
GetServerNameByPLID
GetServerRecord
GetServerRecordByName
GetServerRecordCount
GetServerViewFromName
GetTimerManager
GetWindowKindByName
HideDocument
InRecoverySave
IsDocumentOpen
IsQuitting
LastActiveDocumentOfType
LicenseInfoStillValid
OpenDocument
OpenDocumentShowOrHide
QuerySystemFont
RegisterNotificationHandler
RemoveServerView
SetCurrentView
ShowDocument
ShowDocumentDontFocus
StartServer
StopServer
UnregisterNotificationHandler

IClient Properties 
ApplicationHandle
CommandLauncher
Count
CurrentView
GUIManager
MainWindowHandle
NavigationSystem
ProcessControl
ServerModule
ServerModuleByName
TimerManager

IClient メソッド

AddServerView メソッド

(IClient インターフェース)
Syntax 
Procedure AddServerView (AView : IServerView);
Description 
このプロシージャは、Altium Designer 内の Client オブジェクトにカスタムパネルなどのドキュメントビューを追加します。サーバーコマンドが登録される TServerModule のコンストラクタ内で、グローバルパネルビューを作成する場所です。TServerModule.CreateServerViews メソッドでグローバルパネルフォームと、そのパネルフォームから作成されたビューを持ちます。その後、ビューはサーバーモジュール(TServerModule.AddView())およびクライアントオブジェクト(Client.AddServerView)に追加されます。
See also 
IServerView インターフェース
IClient インターフェース
TServerModule クラスの RT_ServerImplementation

ApplicationIdle メソッド

(IClient インターフェース)
Syntax 
Procedure ApplicationIdle;
Description 
ApplicationIdle メソッドが呼び出されると、Altium Designer をウィンドウや Altium Designer 固有のメッセージを処理できるモードにします。
See also 
IClient インターフェース

BeginDisableInterface method

(IClient インターフェース)
Syntax 
Procedure BeginDisableInterface;
Description 
BeginDisableInterface および EndDisableInterface メソッドは、Client のユーザーインターフェースを無効化する必要がある場合に呼び出されます。たとえば、大規模な処理が行われているとき、ユーザーの操作を受け付けたくない場合などです。
See also 
EndDisableInterface メソッド
IClient インターフェース

BeginDocumentLoad メソッド

(IClient インターフェース)
Syntax 
Procedure BeginDocumentLoad;
Description 
BeginDocumentLoad および EndDocumentLoad プロシージャは、Altium Designer で複数のドキュメントをまとめて読み込む際に使用します。
Example

 

Client.BeginDocumentLoad;
ServerDocument1  :=  Client.OpenDocument('Text',FileName1);
ServerDocument2  :=  Client.OpenDocument('Text',FileName2);
ServerDocument3  :=  Client.OpenDocument('Text',FileName3);
Client.EndDocumentLoad(True);

 

See also 
EndDocumentLoad メソッド
IClient インターフェースBeginRecoverySave method

(IClient インターフェース)
Syntax 
Procedure BeginRecoverySave;
Description 
BeginRecoverySave および EndRecoverySave プロパティは、Altium Designer で現在の設計ドキュメントのバックアップを行う際に、ドキュメント名変更のクライアント通知を抑制するために使用できます。リカバリ保存処理が進行中かどうかを確認するには、InRecoverySave メソッドを呼び出します。
See also 
EndRecoverySave メソッド
InRecoverySave メソッド
IClient インターフェース

BroadcastNotification method

(IClient インターフェース)
Syntax 
Procedure BroadcastNotification (ANotification : INotification);
Description 
このプロシージャは、Altium Designer 内で通知メッセージをブロードキャストし、すべてのアクティブな設計ドキュメント/サーバーが応答する機会を持ちます。BoardcastNotification は DispatchNotification (Nil, ANotification) と同等です。Notification インターフェースには 5 種類あります:ISystemNotification、IDocumentNotification、IDocumentFormNotification、IViewNotification、IModuleNotification。
See also 
DispatchNotifiaction メソッド
INotification インターフェース
IClient インターフェース

Client_CanServerStarted method

(IClient インターフェース)
Syntax 
Function CanServerStarted (AModuleName : PChar) : LongBool; 
Description 
この関数は、Altium Designer でサーバーモジュールをロードできるかどうかを確認します。StartServer 関数を呼び出す前に使用してください。
See also 
IClient インターフェース
StartServer メソッド

CloseDocument method

(IClient インターフェース)
Syntax 
Procedure CloseDocument(ADocument : IServerDocument);
Description 
このプロシージャは、IServerDocument パラメータを取得し、指定されたドキュメント(すでに Altium Designer でロードおよびオープンされている場合)を閉じます。なお、ドキュメントは Altium Designer から削除されるわけではなく、たとえばProjects パネル上には残ります。
See also 
OpenDocument メソッド
IClient インターフェース

Count property

(IClient インターフェース)
Syntax 
Property Count : Integer Read GetCount;
Description 
このプロパティは、Altium Designer の現在のセッションでアクティブなサーバーの数を返します。ServerModule プロパティと組み合わせて使用し、サーバーモジュールインターフェースを取得します。
See also 
GetCount メソッド
IServerModule インターフェース
IClient インターフェース

DispatchNotification method

(IClient インターフェース)
Syntax 
Procedure DispatchNotification (AServerModule : IServerModule; ANotification : INotification); 
Description 
このプロシージャは、Altium Designer 内のターゲットサーバーに通知メッセージをディスパッチします。Notification インターフェースには 4 種類あります:IDocumentNotification、IDocumentFormNotification、IViewNotification、IModuleNotification。
See also 
INotification インターフェース
IClient インターフェース

EndDisableInterface method

(IClient インターフェース)
Syntax 
Procedure EndDisableInterface;
Description 
BeginDisableInterface および EndDisableInterface メソッドは、Client のユーザーインターフェースを無効化する必要がある場合に呼び出されます。たとえば、大規模な
処理が行われているとき、ユーザーの操作を受け付けたくない場合などです。これは Altium Designer 全体に適用されるメソッドです。
See also 
BeginDisableInterface メソッド
IClient インターフェース

EndDocumentLoad method

(IClient インターフェース)
Syntax 
Procedure EndDocumentLoad(AShow : LongBool);
Description 
BeginDocumentLoad および EndDocumentLoad プロシージャは、Altium Designer で複数のドキュメントをまとめて読み込む際に使用します。
Example

 

Client.BeginDocumentLoad;
ServerDocument1  :=  Client.OpenDocument('Text',FileName1);
ServerDocument2  :=  Client.OpenDocument('Text',FileName2);
ServerDocument3  :=  Client.OpenDocument('Text',FileName3);
Client.EndDocumentLoad(True);

 

See also 
IClient インターフェース
BeginDocumentLoad メソッド

EndRecoverySave method

(IClient インターフェース)
Syntax 
Procedure EndRecoverySave;
Description 
BeginRecoverySave および EndRecoverySave メソッドは、Altium Designer で現在の設計ドキュメントのバックアップを行う際に、ドキュメント名変更のクライアント通知を抑制するために使用できます。
リカバリ保存が進行中かどうかを確認するには、InRecoverySave メソッドを呼び出してください。
See also 
BeginRecoverySave メソッド
InRecoverySave メソッド
IClient インターフェース

GetApplicationHandle method

(IClient インターフェース)
Syntax 
Function GetApplicationHandle : Integer;
Description 
サーバーコード内でダイアログを動的に作成する必要がある場合、このアプリケーションハンドルを使用できます。これにより、Altium Designer 上に表示されるダイアログが Altium Designer のアイコンを継承し、タスクバー上で一つのアプリケーションとして表示されます。
この ApplicationHandle プロパティは、ダイアログの作成コンストラクタのパラメータとして渡すことができます。GetMainWindowHandle 関数はこれと同等です。
See also 
GetMainWindowHandle メソッド
ApplicationHandle プロパティ
IClient インターフェース

GetCommandLauncher method

(IClient インターフェース)
Syntax 
Function GetCommandLauncher : ICommandLauncher;
Description 
この関数は、Client のプロセスランチャーを表す ICommandLauncher インターフェースを取得します。これを使ってサーバープロセスやそのパラメータを起動できます。IProcessLauncher インターフェースも参照してください。
See also 
ICommandLauncher インターフェース
IProcessLauncher インターフェース
IClient インターフェース

GetCount method

(IClient インターフェース)
Syntax 
Function GetCount : Integer;
Description 
このメソッドは、Altium Designer の現在のセッションでアクティブ(ロード済み)のサーバー数を返します。このメソッド(または Count プロパティ)を ServerModule プロパティと組み合わせて使用し、サーバーモジュールインターフェースを取得します。
See also 
Count プロパティ
IClient インターフェース

GetCurrentView method

(IClient インターフェース)
Syntax 
Function GetCurrentView : IServerDocumentView;
Description 
この関数は、現在のビュー(つまり Altium Designer でフォーカスされているオープンドキュメント)を取得します。CurrentView プロパティおよび IServerDocumentView インターフェースも参照してください。
Example

 

Procedure  GrabACurrentDocumentView;
Var 
  ServerDocumentView  :  IServerDocumentView;
  CurrentDirectory  :  AnsiString;
Begin
  ServerDocumentView  :=  Client.GetCurrentView;
  CurrentDirectory  :=  ExtractFileDir(ServerDocumentView.GetOwnerDocument.FileName);
End;

 

See also 
CurrentView プロパティ
IClient インターフェース

GetDefaultExtensionForDocumentKind method

(IClient インターフェース)
Syntax 
Function GetDefaultExtensionForDocumentKind(DocumentKind : PChar) : PChar; 
Description 
この関数は、ドキュメント種別パラメータに基づいて、特定のドキュメント種別のデフォルト拡張子を返します。
IClient インターフェース

GetDocumentByPath method

(IClient インターフェース)
Syntax 
Function GetDocumentByPath(Const AFilePath : WideString) : IServerDocument;
Description 
この関数は、設計ドキュメントへのフルファイルパスを取得し、パスが有効な場合は、設計ドキュメント全体およびそのパネルを表す IServerDocument オブジェクトインターフェースを返します。
See also 
IClient インターフェース

GetDocumentKindFromDocumentPath method

(IClient インターフェース)
Syntax 
Function GetDocumentKindFromDocumentPath (Path :(IClient インターフェース)
Syntax 
Function GetMainWindowHandle : Integer;
Description 
サーバー側のコードからダイアログを動的に作成する必要がある場合、このアプリケーションハンドルを使用できます。これにより、Altium Designer 上に表示されるダイアログが Altium Designer のアイコンを継承し、タスクバー上で一つのアプリケーションとして表示されます。この ApplicationHandle プロパティも同等のものです。
See also 
GetApplicationHandle メソッド
ApplicationHandle プロパティ
IClient インターフェース

GetNavigationSystem method

(IClient インターフェース)
Syntax 
Function GetNavigationSystem : INavigationSystem; 
Description 
この関数はナビゲーションシステムインターフェースを返します。
See also 
INavigationSystem インターフェース
IClient インターフェース

GetOptionsManager function

(IClient インターフェース)
Syntax 
Function GetOptionsManager : IOptionsManager;
Description 
このメソッドは IOptionsManager インターフェースを取得します。このインターフェースを使うことで、GetOptionsReader や GetOptionsWriter を呼び出して、ターゲットサーバーのオプション(設定)の取得や書き込みが可能です。各エディターサーバーには、サーバードキュメントを管理するためのオプションがあります。
Example 
Var
Reader : IOptionsReader;
Begin
Reader := Client.OptionsManager.GetOptionsReader(NameOfServer,'');
If Reader = Nil Then Exit;

AValue := Reader.ReadBoolean(NameOfServerPreferences,SettingName,DefaultValue);
End;
See also 
IClient インターフェース
IOptionsManager

GetOptionsSetByName method

(IClient インターフェース)
Syntax 
Function GetOptionsSetByName (Const AName : Widestring) : IDocumentOptionsSet;
Description 
この関数は、有効な Name 文字列に基づいて IDocumentOptionsSet インターフェースを取得します。
See also 
GetOptionsSetCount メソッド
GetOptionsSet メソッド
IDocumentOptionsSet インターフェース
IClient インターフェース

GetOptionsSetCount method

(IClient インターフェース)
Syntax 
Function GetOptionsSetCount : Integer;
Description 
この関数は、オプションセットの数を返します。
See also 
GetOptionsSet メソッド
GetOptionsSetByName メソッド
IClient インターフェース

GetOptionsSet method

(IClient インターフェース)
Syntax 
Function GetOptionsSet (Index : Integer) : IDocumentOptionsSet;
Description 
この関数は、インデックス指定されたオプションセット(IDocumentOptionsSet 型)を返します。
See also 
GetOptionsSetCount メソッド
GetOptionsSetByName メソッド
IClient インターフェース

GetPanelInfoByName method

(IClient インターフェース)
Syntax 
Function GetPanelInfoByName (Const APanelName : Widestring)
: IServerPanelInfo;
Description 
この関数は、指定したパネルの IServerPanelInfo インターフェースを取得します。
See also 
IServerPanelInfo インターフェース
IClient インターフェース

GetProcessControl method

(IClient インターフェース)
Syntax 
Function GetProcessControl : IProcessControl;
Description 
プロセスコントロールインターフェースを返します。このプロセスコントロールは「リエントラント」プロセスの数、すなわち、あるクライアントのプロセスが他のアクティブなクライアントのプロセスの上に積み重なって発生している状態(プロセス深度)を示します。プロセスコントロールのプロセス深度がゼロの場合、Altium Designer で何も実行されていないことを示します。
See also 
IProcessControl インターフェース
IClient インターフェース

GetRealMainWindowHandle method

(IClient インターフェース)
Syntax 
Function GetRealMainWindowHandle : THandle;
Description 
この関数は、Altium Designer のメインウィンドウのウィンドウハンドルを返します。
See also 
IClient インターフェース

GetServerNameByPLID method

(IClient インターフェース)
Syntax 
Function GetServerNameByPLID(APLID : PChar) : PChar; 
Description 
この関数は、PLID 識別子文字列(サーバーのリソースファイルから抽出された文字列)に基づいてサーバー名を返します。
See also 
IClient インターフェース

GetServerModule method

(IClient インターフェース)
Syntax 
Function GetServerModule(Index : Integer) : IServerModule;
Description 
ServerModule プロパティは、Count プロパティと組み合わせてアクティブ(ロード済み)のサーバーを取得するために使用されます。ServerModule プロパティは、Altium Designer でロードされているサーバーモジュールの IServerModule インターフェースを返します。
なお、PCB サーバーと Schematic サーバーには、それぞれ独自の IPCB_ServerInterface および ISch_ServerInterface インターフェースがあります。
IServerModule example 
この例では、Schematic の IServerModule インターフェースを取得し、Altium Designer で開いているドキュメントビューの数を返します。 

Var
  ServerModule  :  IServerModule;
Begin
  If  Client  =  Nil  Then  Exit;
 
  ServerModule  :=  Client.ServerModuleByName('SCH');
  ShowMessage('Doc  Count  =  '  +  IntToStr(ServerModule.DocumentCount));
End;

 

See also 
Count プロパティ
IServerModule プロパティ
ServerModuleByName プロパティ
IClient インターフェース

GetServerModuleByName method

(IClient インターフェース)
Syntax 
Function GetServerModuleByName (Const AModuleName : Widestring) : IServerModule;
Description 
この関数は、AModuleName パラメータの有効性に応じてサーバーモジュールインターフェースを返します。例として 'PCB' や 'SCH' などがあります。インデックス指定のサーバーモジュールを返すには、ServerModuleByName プロパティを使用してください。
Example

 

Var
  ServerModule  :  IServerModule;
Begin
  If  Client  =  Nil  Then  Exit;
 
  ServerModule  :=  Client.ServerModuleByName('SCH');
  ShowMessage('Doc  Count  =  '  +  IntToStr(ServerModule.DocumentCount));
End;

 

See also 
GetServerModule メソッド
ServerModule プロパティ
IClient インターフェース

GetServerRecord method

(IClient インターフェース)
Syntax 
Function GetServerRecord (Index : Integer) : IServerRecord;
Description 
GetServerRecord 関数は、Altium Designer インストールの System フォルダー内のインストール *.INS ファイルに基づいてインストールされているサーバーの数を報告します。これは GetServerRecordCount 関数と組み合わせて使用します。
IClient インターフェースには GetServerRecord と GetServerModule メソッドがあります。これら2つのメソッドの違いは、GetServerRecord 関数はインストールされているサーバー(Altium Designer インストールの \System\ フォルダー内の *.INS ファイル)の数を報告する点です。
GetServerModule は単に Altium Designer でアクティブ(ロード済み)のサーバーを返し、各アクティブサーバーを取得するには GetCount 関数を呼び出し、そのカウントパラメータを GetServerModule 関数に渡す必要があります。
See also 
GetServerRecordCount メソッド
GetServerModule メソッド
IClient インターフェース

GetServerRecordCount method

(IClient インターフェース)
Syntax 
Function GetServerRecordCount : Integer;
Description 
この関数は、Altium Designer ソフトウェアインストールの \System\ フォルダー内にあるサーバーインストールファイルを表すサーバーレコードの数を返します。これは GetServerRecord 関数と組み合わせて使用します。
See also 
IServerRecord インターフェース
IClient インターフェース

GetServerRecordByName method

(IClient インターフェース)
Syntax 
Function GetServerRecordByName(AModuleName : WideString) : IServerRecord;
Description 
この関数は、AModuleName パラメータに基づいて IServerRecord インターフェースを返します。この IServerRecord インターフェースは、サーバーのインストールファイル(INS 拡張子付き)を表します。
Example

 

Var
  ClientModule  :  IClient;
  ServerRecord  :  IServerRecord;
  Version  :  WideString;
Begin
  ClientModule  :=  Client;
  If  ClientModule  =  Nil  Then  Exit;
 
  //The  IServerRecord  interface  encapsulates  the  details
  //  of  a  server's  installation  file
 
  //We  are  interested  in  the Altium Designer's  Client  Module
  //  and  fetch  the  product  version.
  ServerRecord  :=  ClientModule.GetServerRecordByName('CLIENT');
  Version  :=  ServerRecord.GetVersion;
 
  ShowMessage(Version);
End;

 

See also 
IServerRecord インターフェース

IClient インターフェース

GetServerViewFromName method

(IClient インターフェース)
Syntax 
Function GetServerViewFromName (Const ViewName : Widestring) : IServerView;
Description 
この関数は、サーバービュー名に応じてサーバービューオブジェクトインターフェースを返します。IServerView インターフェースはパネルビューを表すとともに、ドキュメントビューの祖先でもあります。
See also 
IExternalForm インターフェース
IServerView インターフェース
IClient インターフェース

GetTimerManager Interface

(IClient インターフェース)
Syntax 
Function GetTimerManager : ITimerManager; 
Description 
この関数は、クライアントサブシステムに関連付けられたタイマーマネージャインターフェースを返します。 also 
ITimerManager インターフェース
IClient インターフェース

GetWindowKindByName method

(IClient インターフェース)
Syntax 
Function GetWindowKindByName (AWindowKindName : Widestring : IServerWindowKind
Description 
この関数は、AWindowKindName パラメータ(ドキュメント種別を示す)に基づいて IServerWindowKind インターフェースを返します。例えば、PCB エディターには PCB ドキュメントと PCBLIB ドキュメントの2種類があります。
See also 
IServerWindowKind インターフェース
IClient インターフェース

HideDocument method

(IClient インターフェース)
Syntax 
Procedure HideDocument (Const ADocument : IServerDocument); 
Description 
このプロシージャはドキュメントを非表示にします。つまり、フォーカスを外しますが、閉じたり破棄したりはしません。
See also 
CloseDocument メソッド
OpenDocument メソッド
ShowDocument メソッド
IServerDocument インターフェース
IClient インターフェース

OpenDocumentShowOrHide メソッド

(IClient インターフェース)
Syntax 
Function OpenDocumentShowOrHide (Const AKind, AFileName : WideString; AShowInTree : Boolean) : IServerDocument;
Description 
この関数は特定のドキュメントを開きますが、Altium Designer ワークスペースでの表示方法を制御できます。
See also 
IClient インターフェースHandleException method

(IClient インターフェース)
Syntax 
Procedure HandleException (Const AMessage : WideString);
Description

Example

See also 
IClient インターフェース

InRecoverySave method

(IClient インターフェース)
Syntax 
Function InRecoverySave : LongBool 
Description 
この関数は、BeginRecoverySave または EndRecoverySave メソッドを呼び出す前に、Altium Designer がリカバリーセーブモード中かどうかを確認します。
See also 
BeginRecoverySave メソッド
EndRecoverySave メソッド
IClient インターフェース

IsDocumentOpen method

(IClient インターフェース)
Syntax 
Function IsDocumentOpen (Const AFilePath : PChar) : LongBool; 
Description 
この関数は、指定した AFilePath パラメータが有効かどうかに依存して、ドキュメントが Altium Designer で開かれているかどうかをブール値で返します。
See also 
IClient インターフェース

IsQuitting method

(IClient インターフェース)
Syntax 
Function IsQuitting : Boolean; 
Description 
この関数は、Altium Designer の状態を表すブール値を返します。True の場合は Altium Designer が終了しようとしている、または終了処理中であることを示し、False の場合は Altium Designer がまだアクティブであることを示します。
Seealso 
ShowDocument メソッド
IClient インターフェース

OpenNewDocument method

(IClient インターフェース)
Syntax 
Function OpenNewDocument (Const AKind, AFileName, ANewName : Widestring; ReuseExisting : Boolean) : IServerDocument;
Description

Example

See also 
IClient インターフェース

QuerySystemFont method

(IClient インターフェース)
Syntax 
Procedure QuerySystemFont ( QueryMode : TFontQueryMode; 
Var AUseSysFont : Boolean;
Var AFontName : WideString;
Var AFontSize : Integer;
Var AFontStyle : TFontStyles;
Var AFontColor : TColor;
Var AFontCharset : TFontCharset);
Description 
使用されているシステムフォントを取得します。
See also 
IClient インターフェース

RegisterNotificationHandler method

(IClient インターフェース)
Syntax 
Procedure RegisterNotificationHandler(Const Handler : INotificationHandler); 
Description 
RegisterNotificationHandler メソッドは、サーバーオブジェクトが作成されてコンピュータのメモリにロードされた後、Altium Designer のクライアントモジュール部分に通知ハンドラーを登録します。Handler パラメータにはサーバーモジュールオブジェクトが含まれます。
Notes 
INotificationHandler オブジェクトインターフェースは、Altium Designer で発生した通知の処理を担当します。
各サーバーオブジェクトは、システム全体の環境設定ダイアログからオプション値が調整された際の通知を処理する HandleNotification プロシージャを持っています。 
HandleNotification プロシージャは、例えば特定のサーバー通知コードが検出されるたびに、サーバーパネル上のサーバー環境設定値を更新する呼び出しを含みます。
このメソッドは通常、サーバー開発時に使用され、スクリプトでは使用されません。
See also 
BroadcastNotification メソッド
DispatchNotification メソッド
UnRegisterNotificationHandler メソッド
INotificationHandler インターフェース
IClient インターフェース

RemoveServerView method

(IClient インターフェース)
Syntax 
Procedure RemoveServerView (Const AView : IServerView);
Description 
このプロシージャは、サーバービュー(サーバードキュメントウィンドウを表す)を Altium Designer から削除します。
See also 
GetCurrentView メソッド
IClient インターフェース

ShowDocumentDontFocus method

(IClient インターフェース)
Syntax 
Procedure ShowDocumentDontFocus(ADocument : IServerDocument);
Description 
このプロシージャは IServerDocument パラメータを取得し、その設計ドキュメントを表示しますが、直前にフォーカスされていたドキュメントのフォーカスはそのまま残します。すでに設計ドキュメントが開かれていない場合でも、この設計ドキュメントは表示されますが、フォーカスはされません。
See also 
OpenDocument メソッド
ShowDocument メソッド
IServerDocument インターフェース
IClient インターフェース

ShowDocument method

(IClient インターフェース)
Syntax 
Procedure ShowDocument (ADocument : IServerDocument);
Description 
このプロシージャは、Altium Designer にロードされたサーバードキュメントを表す IServerDocument パラメータを取得し、その設計ドキュメントを Altium Designer 上に表示します。
IServerDocument example 
この例では、クライアントインターフェースを取得し、ドキュメントを開いて表示します。

 

Procedure  OpenAndShowADocument(Filename  :  TDynamicString);
Var
  ReportDocument  :  IServerDocument;
Begin
  If  Client  =  Nil  Then  Exit;
  ReportDocument  :=  Client.OpenDocument('Text',FileName);
  If  ReportDocument  <>  Nil  Then
  Client.ShowDocument(ReportDocument);
End;

 

See also 
OpenDocument メソッド
IServerDocument インターフェース
IClient インターフェース

SetCurrentView method

(IClient インターフェース)
Syntax 
Procedure SetCurrentView(Value : IServerDocumentView); 
Description 
このプロシージャは IServerDocumentView パラメータを取得し、このドキュメントフォームを Altium Designer の現在のビューとして設定します。
See also 
GetCurrentView メソッド
CurrentView プロパティ
IClient インターフェース

StopServer method

(IClient インターフェース)
Syntax 
Function StopServer (AModuleName : WideString) : Boolean;
Description 
StartServer および StopServer プロパティは、Altium Designer でサーバーがまだロードされていない場合にサーバーをロードし、そのサーバーのプロセスを呼び出す前や、サーバープロセスの利用が終わった後にサーバーを停止するために使用できます。これによりコンピュータのメモリを節約できます。 
StartServer 関数は、サーバーがまだロードされていない場合に設計ドキュメントをロードし、サーバーのプロセスや API 関数を実行する必要がある場合によく使われます。例えば、Altium Designer の空のセッションで PCB ドキュメントが開かれていない場合に、PCB API を使って PCB ドキュメントの内容を操作するには、まず PCB サーバーを「開始」して PCB API を有効にする必要があります。
Example of the StopServer method 
Client.StopServer('PCB');
See also 
StartServer メソッド
IClient インターフェース

StartServer method

(IClient インターフェース)
Syntax 
Function StartServer (AModuleName : WideString) : Boolean;
Description 
StartServer および StopServer プロパティは、Altium Designer でサーバーがまだロードされていない場合にサーバーをロードし、そのサーバーのプロセスを呼び出す前や、サーバープロセスの利用が終わった後にサーバーを停止するために使用できます。これによりコンピュータのメモリを節約できます。 
StartServer 関数は、サーバーがまだロードされていない場合に設計ドキュメントをロードし、サーバーのプロセスや API 関数を実行する必要がある場合によく使われます。例えば、Altium Designer の空のセッションで PCB ドキュメントが開かれていない場合に、PCB API を使って PCB ドキュメントの内容を操作するには、まず PCB サーバーを「開始」して PCB API を有効にする必要があります。
Example of the StartServer method 
Client.StartServer('PCB');
See also 
StopServer メソッド
IClient インターフェース

UnregisterNotificationHandler method

(IClient インターフェース)
Syntax 
Procedure UnregisterNotificationHandler(Const Handler : INotificationHandler);
Description 
UnregisterNotificationHandler メソッドは、サーバーオブジェクトがスコープ外(破棄)になった際に、クライアントから通知ハンドラーの登録を解除します。Handler パラメータにはサーバーモジュールオブジェクトが含まれます。
Notes 
INotificationHandler オブジェクトインターフェースは、Altium Designer で発生した通知の処理を担当します。
各サーバーオブジェクトは、システム全体の環境設定ダイアログからオプション値が調整された際の通知を処理する HandleNotification プロシージャを持っています。 
HandleNotification プロシージャは、例えば特定のサーバー通知コードが検出されるたびに、サーバーパネル上のサーバー環境設定値を更新する呼び出しを含みます。
このメソッドは通常、サーバー開発時に使用され、スクリプトでは使用されません。
See also 
BroadcastNotification
DispatchNotification
RegisterNotificationHandler メソッド
INotificationHandler インターフェース
IClient インターフェース

AddViewToFavorites メソッド

(IClient インターフェース)
Syntax 
Function AddViewToFavorites(Const AView : IServerDocumentView; AIsSnippet : Boolean) : Boolean;
Description

Example

See also 
IClient インターフェース

GetDynamicHelpManager method

(IClient インターフェース)
Syntax 
Function GetDynamicHelpManager : IDynamicHelpManager;
Description 
このメソッドは、Altium Designer の Knowledge Center パネルを表す Dynamic Help マネージャーを返します。
See also 
IClient インターフェース
IDynamicHelpManager インターフェース。

IClient Properties

ApplicationHandle property

(IClient インターフェース)
Syntax 
Property ApplicationHandle : Integer
Description 
ApplicationHandle プロパティは、サーバーからダイアログを動的に作成する必要がある場合に、アプリケーションハンドルをサーバーに設定します。Altium Designer の前面に表示されるダイアログは、Altium Designer のアイコンを継承し、タスクバー上で一つのアプリケーションとして表示されます。 
この ApplicationHandle プロパティは、例えば動的ダイアログの作成コンストラクタのパラメータとして渡すことができます。
Note 
通常、スクリプト作成者はこの applicationhandle プロパティを気にする必要はありません。このプロパティは Altium Designer SDK の一部としてサーバー作成者が使用します。
Server Example 
サーバープロジェクトのメインユニット内 

Function  ServerFactory  (AClient  :  IClient)  :  IServerModule;  Safecall;
Begin
  Result  :=  TAddOn.Create(AClient,  'AddOn');
  Application.Handle  :=  Client.ApplicationHandle;
End;

 

サーバープロジェクトのコマンドユニット内   also 
IClient インターフェース

CommandLauncher property

(IClient インターフェース)
Syntax 
Property CommandLauncher : ICommandLauncher Read GetCommandLauncher;
Description 
CommandLauncher プロパティは Command Launcher インターフェースを返します。このインターフェースには、コマンドを起動するために使用できるクライアントのプロセスランチャーのテーブルが含まれています。 

If  StringsEqual(ServerModule.ModuleName,'TextEdit')  Then
Begin
  Client.CommandLauncher.LaunchCommand(
  'TextEdit:MoveCursorToTopOfDocument',
  Nil,0,ServerDocument.View[0]);
End;

 

GetCommandLauncher example

 

ACommandLauncher  :=  Client.GetCommandLauncher;
If  ACommandLauncher  <>  Nil  Then
Begin
  ACommandLauncher.GetCommandState(Command,
  Parameters,
  View,
  Enabled,
  Checked,
  Visible,
  Caption,
  Image);
End;

 

See also 
GetCommandLauncher メソッド
IProcessLauncher インターフェース
ICommandLauncher インターフェース
IClient インターフェース

CurrentView property

(IClient インターフェース)
Syntax 
Property CurrentView : IServerDocumentView Read GetCurrentView Write SetCurrentView;
Description 
このプロパティは、Altium Designer の現在の設計ドキュメントビューを表す現在のドキュメントビューインターフェースを返します。
SendMessage Example

 

Client.SendMessage('PCB:Zoom''Action=Redraw'  255,  Client.CurrentView);

 

CurrentView example

 

Procedure  GrabACurrentDocumentView;
Var 
  ServerDocumentView  :  IServerDocumentView;
  FileName  :  WideString;
Begin
  ServerDocumentView  :=  Client.CurrentView;
  FileName  :=  ServerDocumentView.GetOwnerDocument.FileName;
End;

 

ViewName example

 

If  StrPas(Client.CurrentView.ViewName)  <>  UpperCase('PCBLib')  Then  Exit;

 

このコードスニペットは、 Client.CurrentView.ViewName メソッドを使用して現在のドキュメントの種類を調べます。

See also 
GetCurrentView メソッド
SetCurrentView メソッド
IServerDocumentView インターフェース
IClient インターフェース

GUIManager Property

(IClient インターフェース)
Syntax 
Property GUIManager : IGUIManager Read GetGUIManager;
Description 
GUIManager プロパティは GUIManager インターフェースを返します。このインターフェースオブジェクトは、ステータスバーの制御やパネルの位置・状態など、Altium Designer のグラフィカルユーザーインターフェースを扱います。
See also 
IGUIManager インターフェース
IClient インターフェース

NavigationSystem property

(IClient インターフェース)
Syntax 
Property NavigationSystem : INavigationSystem Read GetNavigationSystem;
Description 
NavigationSystem プロパティは、Altium Designer のナビゲーションシステムを表します。ナビゲーションシステムは、設計プロジェクトのネット接続の中心となるナビゲーションパネルの基盤です。設計は、コンパイル済みシートのリスト、フラット化された階層、構造ツリーの3つの方法で構成できます。
Example

See also 
IClient インターフェース
INavigationSystem インターフェース

ProcessControl property

(IClient インターフェース)
Syntax 
Property ProcessControl : IProcessControl Read GetProcessControl;
Description 
このプロパティは IProcessControl インターフェースを返します。この Process Control インターフェースは、「リエントラント」プロセスの数、すなわち、あるクライアントのプロセスが他のアクティブなクライアントプロセスの上に積み重なって発生している状態(プロセス深度)を判定します。プロセスコントロールのプロセス深度がゼロの場合、Altium Designer で何も実行されていないことを示します。詳細は IProcessControl インターフServerModuleByName property

(IClient インターフェース)
Syntax 
プロパティ ServerModuleByNameWidestring : IServerModule Read GetServerModuleByName;
Description 
ServerModuleByName プロパティは、クライアントのアクティブサーバーテーブル内でモジュール名が見つかった場合に IServerModule インターフェースを返します。PCB エディタの場合、モジュール名は PCB、回路図エディタの場合は SCH などとなります。
Server Names

Example

 

Var
  ServerModule  :  IServerModule;
Begin
  If  Client  =  Nil  Then  Exit;
 
  ServerModule  :=  Client.ServerModuleByName('SCH');
  ShowMessage('Doc  Count  =  '  +  IntToStr(ServerModule.DocumentCount));
End;

 

See  
IClient インターフェース
IServerModule インターフェース

TimerManager property

(IClient インターフェース)
Syntax 
プロパティ TimerManager : ITimerManager Read GetTimerManager;
Description 
このプロパティは、タイマーマネージャーオブジェクトのインターフェースを返します。
See also 
IClient インターフェース
ITimerManager インターフェース

OptionsManager property

(IClient インターフェース)
Syntax 
プロパティ OptionsManager : IOptionsManager Read GetOptionsManager;
Description 
このプロパティは読み取り専用で、IOptionsManager インターフェースを返します。このインターフェースは、指定されたサーバーの Altium Designer のシステム全体の環境設定ダイアログに対して値の読み書きを管理する役割を担います。
このインターフェースは、システム全体の環境設定ダイアログに自分のオプションページを追加し、それらのオプションページ上のコントロールを管理したいサーバー開発者にとって有用です。
Example

 

Var
  Reader  :  IOptionsReader;
Begin
  Reader  :=  Client.OptionsManager.GetOptionsReader(NameOfServer,'');
  If  Reader  =  Nil  Then  Exit;
 
  AValue  :=  Reader.ReadBoolean(NameOfServerPreferences,SettingName,DefaultValue);
End;

 

See  IClient インターフェース
IOptionsManager インターフェース

AI-LocalizedAI-localized
If you find an issue, select the text/image and pressCtrl + Enterto send us your feedback.