2016 R2

新機能紹介

Alphacam 2016 R2 の新しい機能を紹介します: 2016 R2 新機能紹介

2016 R2

内容
内容..................................................................................................................................................................................................................... 2
重要事項 ............................................................................................................................................................................................................. 4
対応 OS .......................................................................................................................................................................................................... 4
ライセンス要件 .............................................................................................................................................................................................. 4
メニュー＋ツールバー形式のインターフェースは 2016R2 で最後となります ............................................................................................. 4
32 ビット Alphacam は 2016R2 で最後となります ....................................................................................................................................... 4
Visual Basic 7.0 .............................................................................................................................................................................................. 4
インストール ...................................................................................................................................................................................................... 5
Alphacam 2016 R2 のインストール ............................................................................................................................................................... 52016 R1 のリボンバー設定の読み込み .......................................................................................................................................................... 5
インターフェース ............................................................................................................................................................................................... 6
Alphacam クリップボード ............................................................................................................................................................................. 6
ウェーブフォームポケットのオプション追加 ............................................................................................................................................... 7
フィーチャー抽出 – 選択されたフェースに対する輪郭フィーチャーの抽出 ................................................................................................ 7
アプローチ／リトラクトタブの追加 .............................................................................................................................................................. 8
挿入ページ – 自動配置 ................................................................................................................................................................................... 9
傾斜アプローチの角度指定オプション ........................................................................................................................................................ 10
新規コマンドボタンをデフォルト位置に登録 ............................................................................................................................................. 10
フィーチャー抽出
アドイン

パラソリッドカーネルの輪郭抽出 ............................................................................................................................... 11

自動素材作成 .............................................................................................................................................................................. 12

CAD データ出力

出力対象が選択可能 ....................................................................................................................................................... 13

ポストプロセッサ

ノコギリ加工固定サイクル用アトリビュート ............................................................................................................. 13

輪郭加工にスパイラル追い込みオプション追加 .......................................................................................................................................... 14
ポストプロセッサ

4/5 Axis 軸用設定 - Maximum Step Length が追加 ...................................................................................................... 14

CAD データ読み込み ........................................................................................................................................................................................ 14
SpaceClaim 2016 ......................................................................................................................................................................................... 14
ポストスクリプト読み込みの更新 ............................................................................................................................................................... 14
対応 CAD 形式の追加

Adobe PDF , Adobe イラストレータ ..................................................................................................................... 15

形状................................................................................................................................................................................................................... 15
パラメトリックスケッチャ – 画像の連動 .................................................................................................................................................... 15
形状のレイヤ分離 – 新規テスト関数: “囲まれている” ................................................................................................................................. 15

Vero Software Limited

www.alphacam.com

2 of 38

: 2016 R2 新機能紹介

2016 R2形状のレイヤ分離 – 新規テスト関数: “開要素を持つ” ................................................................................................................................. 16
形状のレイヤ分離 – 新規テスト関数 “交差している” .................................................................................................................................. 16
スプライン変換 – 同じレイヤに作成 ........................................................................................................................................................... 17
スプライン／ポリライン沿い加工 – 角の処理の改善 .................................................................................................................................. 18
形状取り出し – パネリング .......................................................................................................................................................................... 18
STL の単純化コマンド ................................................................................................................................................................................. 19
アドバンスド 5 軸加工 ...................................................................................................................................................................................... 19
プログレスバーの改善 ................................................................................................................................................................................. 19
フローライン加工の追加 .............................................................................................................................................................................. 19
API .................................................................................................................................................................................................................... 21
C# アドイン DLLs ........................................................................................................................................................................................ 21
API - SetAttributeForNextElement アトリビュートを格納します ................................................................................................................ 21
シミュレーション ............................................................................................................................................................................................. 21
クランプ、フィクスチャ -Z 方向の移動で素材と干渉チェックを行います ................................................................................................ 21
CAD データ入力 対応バージョン................................................................................................................................................................... 22
メンテナンスレポート ...................................................................................................................................................................................... 23
Appendix A - 2016 R2 での API 改造 ............................................................................................................................................................... 28
Expose Nesting Text Placement .................................................................................................................................................................. 28
Feature API calls for “From Faces” Orientation type .................................................................................................................................... 28
Feature API – AutoExtract and AutoExtract2 Update .................................................................................................................................. 30
Drawing Object ............................................................................................................................................................................................. 30
Drawing.HasPanelingSheets and Drawing.MoveNestedSheetAndPartsToDrawing ................................................................................... 31
Nesting Sheet Database - Command to Insert Sheet at Point ..................................................................................................................... 31
API – Ability to Edit Styles ............................................................................................................................................................................ 32
API - For SetAttributeForNextElement to store more than one attribute ...................................................................................................... 32
New Methods to Help Optimise Add-Ins ...................................................................................................................................................... 33
Appendix B - 64-bit VBA Macros ...................................................................................................................................................................... 35
Introduction .................................................................................................................................................................................................. 35
Fixing Declare Statements ........................................................................................................................................................................... 35
Fixing functions with pointer types ............................................................................................................................................................... 36
VBA 6 Backwards compatibility .................................................................................................................................................................... 36
Testing Macros ............................................................................................................................................................................................. 37
Active X Components ................................................................................................................................................................................... 37
Appendix C – C# Add-Ins ................................................................................................................................................................................. 38

Vero Software Limited

www.alphacam.com

3 of 38

: 2016 R2 新機能紹介

2016 R2

重要事項
対応 OS
Alphacam 2016 R2 が対応しているOSを以下に示します。
Windows 7 - Professional, Enterprise, Ultimate
Windows 8 - Professional, Enterprise
Windows 10 - Professional, Enterprise
詳細な情報はインストールマニュアルまたは http://www.alphacam.com をご覧ください。

ライセンス要件
Alphacam 2016 R2 をご使用になるには、保守終了日が 2016 年 3 月 以降の必要があります。
保守契約が終了すると以下の機能制限が発生します。
レポートの新規作成、編集ができなくなります。既存のレポートを起動することはできます。
パラメトリックスケッチャの新規作成、編集ができなくなります。既存のパラメトリックスケッチャを起動することはできます。
PDF、イラストレータファイルの読み込みができなくなります。

メニュー＋ツールバー形式のインターフェースは 2016R2 で最後となります
Alphacam 2017 R1 からはメニュー形式のインターフェースはなくなりリボンバー形式のみとなります。

32 ビット Alphacam は 2016R2 で最後となります
Alphacam 2017 R1 からは 32 ビット版がなくなり 64 ビット版のみになります。インストールできる OS は 64
ビットの必要があります。
注記: 32 ビット版でしか動作しないマクロやポストは 64 ビット対応にする必要があります。ライコムシステム
ズ社製以外のマクロやポストをご使用の場合、開発元にお問い合わせください。

Visual Basic 7.0
Alphacam の 64 ビット対応のため Microsoft Visual Basic for Applicatons7.0(VBA 7)にアップグレードしました,
VBA7 は 32/64 ビット両方の Alphacam,AlphaEdit に搭載されています.
Alphacam2015R2 以降にインストールされる標準 VBA アドインは VBA7 にアップグレードされ 32/64 の両方に使用できます．
独自に開発された VBA を 64 ビット Alphacam で動作させるには修正の必要があることがあります． Appendix
B を参照してください．

Vero Software Limited

www.alphacam.com

4 of 38

: 2016 R2 新機能紹介

2016 R2

インストールAlphacam 2016 R2 のインストール
Alphacam 2016 R2 をインストールする際には 32/64 ビットのどちらをインストールするか指定できます．32
ビット Alphacam は 32/64 ビット OS のどちらにもインストールできます．64 ビット Alphacam は 64 ビット OSにしかインストールできません．
64 ビット Alpahcam は大容量のメモリーを使用できる利点があります．

2016 R1 のリボンバー設定の読み込み
Alphacam 2016 R2 は 2016R1 のリボンバー設定を自動的の読み込みます
リボンバー設定の読み込み／保存のデフォルトフォルダは以下になっています。
…\LICOMDIR\Configurations.

Vero Software Limited

www.alphacam.com

5 of 38

: 2016 R2 新機能紹介

2016 R2

インターフェース
Alphacam クリップボード
クリップボードがサポートされ、コピー／切り取り／
貼り付けを行うことができます．別に起動した Alphacam
や別モジュールの Alphacam 間でデータをやりとりすることができます。
リボンバーの編集タブにクリップボード用の 3 コマンドが追加されました。




コピー
切り取り
貼り付け

プロジェクトマネージャの挿入ページには、クリップ
ボードに保存された内容を表示する領域が追加されました。
プレビュー領域からドラッグ＆ドロップで貼り付けることができます。

Vero Software Limited

www.alphacam.com

6 of 38

: 2016 R2 新機能紹介

2016 R2

ウェーブフォームポケットのオプション追加
ウェーブフォームポケットの工具進入オプションにドリル下穴が追加されました。

フィーチャー抽出 – 選択されたフェースに対する輪郭フィーチャーの抽出選択された様々な角度のフェースから、一度に各フェースに垂直な方向で輪郭を抽出できるようになりました。

Vero Software Limited

www.alphacam.com

7 of 38

: 2016 R2 新機能紹介

2016 R2

アプローチ／リトラクトタブの追加
いくつかの加工コマンドにアプローチ／リトラクトタブが追加されました。
アプローチ／リトラクト設定をデフォルトして保存、取り出しする機能に加え、個別に保存することが可能となりました。
これまでアプローチ設定をリトラクトにコピーすることができましたが、リトラクトからアプローチに設定をコピーするボタンが追加されました。
プロジェクトマネージャの工程ページの工程を右クリックすると表示される「アプローチを編集」のダイアログでは「適用」ボタンがあり、ダイアログを開いたままでアプロー
チの変化を確認することができます。
注記: アプローチ／リトラクト設定ファイルの拡張子アプローチ／リトラクト設定ファイル: *.alio.
3D アプローチ／リトラクト設定ファイル: *.a3dlio.

保存されるデフォルトフォルダは以下のフォルダです。
...\LICOMDAT\LeadData.

Vero Software Limited

www.alphacam.com

8 of 38

: 2016 R2 新機能紹介

2016 R2

挿入ページ – 自動配置
プロジェクトマネージャの挿入ページに、配置設定に従って自動的に複数個の配置を行うコマンドが追加されました。
新しいコマンド:

配置設定の新規作成
配置設定の編集
配置設定の削除作成された配置設定を選択するドロップダウンリスト

配置設定の作成、編集をするためのダイアログが追加されました。
この機能は、加工部位の形状をあらかじめ作成し、挿入によって一度に複数個配置する場合に非常に便利です。
注記: 自動配置が選択されたときは 2D トランスフォームを使用できなくなります。

Vero Software Limited

www.alphacam.com

9 of 38

: 2016 R2 新機能紹介

2016 R2

傾斜アプローチの角度指定オプション
アプローチ／リトラクトの傾斜アプローチで傾斜角度を指定するオプションが追加されました。
アングルヘッドの傾斜角度を手動で行う場合、機械的に角度が決まっています。このようなヘッドでは傾斜アプローチ
を角度で指定すると工具の方向と一致したアプローチ／リトラクトが作成され安全な移動を簡単に作成できます。

新規コマンドボタンをデフォルト位置に登録
Alphacam2016R2 で追加されたコマンドのボタンをリボンバ
ーのデフォルト位置に自動登録できるようになりました。自分で任意の位置に登録することもできます。
初回起動から右のメッセージが表示されるようになります。
注記: いいえを選択すると新しいコマンドはリボンバーには登録されませんが、リボンバーの設定で登録することができます。

Vero Software Limited

www.alphacam.com

10 of 38

: 2016 R2 新機能紹介
フィーチャー抽出2016 R2

パラソリッドカーネルの輪郭抽出

フィーチャー抽出の輪郭抽出にはパラソリッドカーネルから提供される処理を使用するように変更されました。
デフォルトでは新しい処理が使用されますが、設定を行う
ことで従来処理の輪郭抽出を行うことができます。

Vero Software Limited

www.alphacam.com

11 of 38

: 2016 R2 新機能紹介
アドイン2016 R2

自動素材作成無償オプションに自動素材作成が追加されました。選択した形状より少し大きめの素材を簡単に作成できます。

Vero Software Limited

www.alphacam.com

12 of 38

: 2016 R2 新機能紹介
CAD データ出力2016 R2

出力対象が選択可能

以下の CAD データ出力が更新されました:







ACIS.
Parasolid (*.x_t).
Parasolid バイナリ (*.x_b).
Rhino.
STL バイナリ.
STL テキスト.

これらの CAD 出力を行うとダイアログが表示され、全て、
可視状態、選択のいずれかを選択することができます。

ポストプロセッサ

ノコギリ加工固定サイクル用アトリビュート

以下のアトリビュートがノコギリ加工の固定サイクル用に追加されました。:
_LicomUKCRHSawStock
加工データタブで指定された切り残し量_LicomUKCRHSawClimbConventional+1 ：ダウンカット, -1：アップカット

またポスト変数 SCA はノコギリの切断加工の角度が形状指定、ダイアログ指定のどちらでも保持されるようになりました。

Vero Software Limited

www.alphacam.com

13 of 38

: 2016 R2 新機能紹介

2016 R2

輪郭加工にスパイラル追い込みオプション追加
輪郭加工と穴加工コマンドにスパイラル追い込みオプションが追加されました。
外側（または内側）から徐々に仕上げ形状に追い込んでいく工具経路が生成されます。
※Standard 以上から搭載

ポストプロセッサ

4/5 Axis 軸用設定 - Maximum Step Length が追加

ポストプロセッサに “Maximum Step Length” 設定が追加されました。
先端点制御機能のない機械では、1 要素の同時 4/5 軸の工具先端の動きが大きいと、実際の機械では工具先端の動きが直線になりません。
この設定を使用して、1 回の移動量を小さくして実機の工具先端の動きをより直線に近づけることができます。
注記: これはポストプロセッサの設定で、4/5 軸の工具経路に有効です。

CAD データ読み込み
SpaceClaim 2016
Alphacam 2016 R2 は SpaceClaim 2016. のパートモデルをサポートしました。

ポストスクリプト読み込みの更新
Alphacam 2016 R2 は更新されたポストスクリプト ローダーを搭載しました。

Vero Software Limited

www.alphacam.com

14 of 38

: 2016 R2 新機能紹介
対応 CAD 形式の追加

2016 R2

Adobe PDF , Adobe イラストレータ

Alphacam 2016 R2 は Adobe PDF とイラストレータのファイルを読み込めるようになりました。
Note: 保守契約が終了するとこの機能は使えなくなります。

形状
パラメトリックスケッチャ – 画像の連動
パラメトリックスケッチャダイアログのリボンバーにイメージの関連づけコマンドが追加されました。イメージはパラ
メトリックスケッチャの設定全体と個々の変数に割り当てることができます。
関連づけされた画像は以下に表示されます。


プロジェクトマネージャの挿入ページ
パラメトリックスケッチャのデータを開くダイアロ
グのプレビュー
パラメトリックスケッチャの起動

注記: パラメトリックスケッチャを起動するダイアログはサ
イズ変更可能になりました。またイメージと従来のプレビューを切り替えるボタンが追加されました。

形状のレイヤ分離 – 新規テスト関数: “囲まれている”
新しいテスト関数 “囲まれている” が追加され、True またはFalse を返します
この関数はある形状が別の形状の内側に含まれているか調べます。ある形状が最も外側であるか調べるときに便利です。

Vero Software Limited

www.alphacam.com

15 of 38

: 2016 R2 新機能紹介

2016 R2形状のレイヤ分離 – 新規テスト関数: “開要素を持つ”
新しいテスト関数 “開要素を持つ”が追加され、True またはFalse を返します。

形状のレイヤ分離 – 新規テスト関数 “交差している”
新しいテスト関数 “交差している” が追加され、True またはFalse を返します。
注記: 交差形状は同じ作業平面上であり、補助線ではいけません。

Vero Software Limited

www.alphacam.com

16 of 38

: 2016 R2 新機能紹介

2016 R2

スプライン変換 – 同じレイヤに作成オプション
スプラインを直線／円弧に変換 コマンドダイアログが更新され、イメージとツールチップがあります。
“同じレイヤに作成”オプションが追加されました。チェッ
クされていると、生成される形状のレイヤはスプラインと同
じレイヤになります。

Vero Software Limited

www.alphacam.com

17 of 38

: 2016 R2 新機能紹介

2016 R2

スプライン／ポリライン沿い加工 – 角の処理の改善
スプライン／ポリライン沿い加工が改善されました。
この改造により内回り／外回りの角が共に食い込みを起こさないようになりました。

形状取り出し – パネリング
形状取り出し – パネリングのコマンドダイアログが更新され、イメージとツールチップがあります。
以下のオプションが追加されました。


パネルエッジの形状と閉じる パネル境界で分断された形状を自動的の閉じます。



カットアウトモードを使用 内側と外側の形状がある場合に有効です。
以下の結果は、上からチェックなしパネルエッジの形状を閉じる
カットアウトモード使用

Vero Software Limited

www.alphacam.com

18 of 38

: 2016 R2 新機能紹介

2016 R2

STL の単純化コマンド
STL の単純化コマンドを使用して STL のファセット数を減らすことができます。コマンドは三次元-STL ツールに追加されました。
このコマンドは荒加工を行う際に、非常に詳細な STL である必要がないときに有効で、計算時間の短縮を行うことができます。
単純化はオリジナル STL のファセット数の何パーセントにするかで指定します。

アドバンスド 5 軸加工
プログレスバーの改善
長時間の計算を必要とする場合の、使用者に対する進行状
況の通知が改善されました。

フローライン加工の追加
サーフェスのパラメータ線を使用したフローライン加工が追加されました。

Vero Software Limited

www.alphacam.com

19 of 38

: 2016 R2 新機能紹介

Vero Software Limited

2016 R2

www.alphacam.com

20 of 38

: 2016 R2 新機能紹介

2016 R2

API
C# アドイン DLLs
Alphacam 2016 R2 から C#で開発した DLL のサポートを開始しました。
これまでは C#の DLL は VBA から呼び出す必要がありました。 今回の改造で VBA は必要なくなります。イベン
トもサポートされました。
注記: 詳細な情報は以下を参照してください。


Appendix C.
The 2016 R2 DVD. Microsoft Visual Studio 2013 C# プロジェクトの３サンプルが含まれています。
\ExampleFiles\API\DotNetAddIns フォルダに詳細な文書も含まれていますAPI - SetAttributeForNextElement アトリビュートを格納します
MillManualToolPath.SetAttributeForNextElement 関数は次のエレメントに複数のアトリビュートを格納する予約をします。

シミュレーション
クランプ、フィクスチャ -Z 方向の移動で素材と干渉チェックを行います
クランプ、フィクスチャを Z 方向に移動させるとき、自動的に素材との干渉チェックを行います。

Vero Software Limited

www.alphacam.com

21 of 38

: 2016 R2 新機能紹介
CAD データ入力

2016 R2

対応バージョン

E = エッセンシャル S = スタンダード

A = アドバンスド

U = アルティメイト

CAD データ形式

ルータ

ストーン

旋盤

ミル

ワイヤ

レーザー

DXF/DWG (AutoCAD 2015)

ESAU

ESAU

ESAU

ESAU

SA

AU

IGES (バージョンなし)

ESAU

ESAU

ESAU

ESAU

SA

AU

Rhino 5.0

SAU

SAU

SAU

SAU

SA

AU

STL (バージョンなし)

SAU

SAU

SAU

SAU

SA

AU

SketchUp 2015

SAU

SAU

SAU

SAU

SA

AU

Adobe PDF

ESAU

ESAU

U

ESAU

SA

AU

Adobe Illustrator

ESAU

ESAU

U

ESAU

SA

AU

PostScript

ESAU

ESAU

U

ESAU

SA

AU

STEP AP214/AP203 (preferred Schemas)

AU

AU

AU

AU

A

U

Part Modeler (Alphacam と同一バージョン)

AU

AU

AU

AU

A

U

VISI Version 20

AU

AU

AU

AU

A

U

Autodesk Inventor 2017 (current, IPT & IAM files)

AU

AU

AU

AU

A

U

AU

AU

AU

AU

A

U

AU

AU

AU

AU

A

U

SOLIDWORKS 2016 (SLDPRT ファイルのみ)

AU

AU

AU

AU

A

U

Solid Edge ST8 (PAR & PSM ファイル)

AU

AU

AU

AU

A

U

Spaceclaim 2016

AU

AU

AU

AU

A

U

AU

AU

AU

AU

A

U

AU

AU

AU

AU

A

U

Creo Parametrics 2.0 (formerly Pro/E Wildfire)

AU

AU

AU

AU

A

U

NX9 (formerly Unigraphics NX)

AU

AU

AU

AU

A

U

ACIS R1 – 2016 1.0
Parasolid 9.0 – 28.0.159

有償オプション
Catia V4
CATIA V5 V5R8 – V5R25 and V5-6R2012 – V5-6R2015

Autodesk Inventor ファイルの読み込みには files, Autodesk Inventor® または Inventor® View™ がインストールされている必要があります。Inventor® View™ は Autodesk からダウンロードできます。

Vero Software Limited

www.alphacam.com

22 of 38

: 2016 R2 新機能紹介

2016 R2

メンテナンスレポート
以下の不具合修正、改善が Alphacam 2016 R2 で行われました
ID

Description

Closing Notes

218

Undo - Solids are not removed after the Home | File | Insert commandhas been used.
Input CAD - DXF/DWG - Geometries on angled planes are imported into
the wrong position.
3D / Space Mouse - 64-bit - Poor performance. Low resolution movement
and cross hair traces.
Clamps and Fixtures - Assigned colour is lost after saving and re-opening adrawing.
3D Machining - Z (Enhanced Undercuts) - Gouging. Bad toolpath createdon some models.
APM - 'Object variable or Width block variable not set' when copying andpasting a Rule.
CAD Import - Solid Edge ST8 files do not import.
Automation Manager - Unhandled exception - No valid paths in file: C.
Advanced 5 Axis - Alphacam crashes when using Surface Machining in
Italian Language.
Drill/Tap Holes Auto Z - Levels and Cycle Data tab - There is a pick button
for the Rapid Down To distance which is unnecessary. The safe rapid level
pick button should only be enabled if the "rapid is absolute" option ischecked.
Previews in various Open / browser dialogs are solid black rectangles.

Fixed.

985
1006
1007
1021
1128
1136
1151
1211
1215

1224

1229 Automation Manager - splash screen and dialog boxes are displayed
incorrectly with a DPI setting greater than 100%.
1233 Simulation - Solid Simulation - When the Machine Configuration is set forpart rotation, the simulation is incorrect and the part is gouged.
1360 Automation Manager - keyboard shortcuts override typing and return to
the Drawing Area.
1382 Homework mode - List NC causes Alphacam to crash.
1392 ECO Option IDs missing
1400 NC Output Manager - The file extension specified by the user has noeffect. Always outputs .anc.
1420 Reports - CDM - Nesting - Incorrect sheet numbers produced.
1485 Nesting - True Shape - Poor sheet usage compared to Quick Nest
Geometries (True Shape) add-in and competitor. Regression from 2015
R1.
1510 Lathe - Waveform Pocket - If a value is entered for Width of Cut for Final
Pass, two operations are created.

Vero Software Limited

www.alphacam.com

Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.

Previews for files with nographic display now contain awhite box with the Alphacam
logo.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.

Fixed.

23 of 38

: 2016 R2 新機能紹介

2016 R2

1512 3D Machining - Z Contour Roughing - Take Account of Previous Machining
does not machine final depth when the first operation has Z stock.

1525 File inserter - does not prompt you to save the drawing after dragging anddropping files into the Drawing Area and selecting File | New.
1546 Canned Cycle Sawing - Saw shown in wrong orientation.
1627 Nesting - LicomUKsab_outer_path attribute is not always set on the outergeometry of a part.
1643 Save As Tool Holder dialog has a corrupted file type.
1656 Multidrill - Use Legacy Multidrill - when two or more holes are concentric:“This key is already associated with an element of this collection”.
1662 Stone - Cut Surfaces / Solids With Disk - Clearance plane value entered isdifferent in drawing.
1664 Automation Manager - NC Output - Tool Ordering is not ordering tools.
NC is output before tool ordering.
1669 Under certain conditions, surfaces are not rendered and cannot be
converted to STL or machined.
1734 Machining - The addition of C axis positions in vertical work planes.
1735 Nesting - Cut small parts first - does nothing.
1742 Automation Manager - Saving nested sheet drawings taking too longwhen there are a large number of nested sheets.
1750 Rough / Finish and Z Contour Roughing - Auto Z - When applying a
toolpath to multiple geometries of different levels, no toolpath is applied
under certain circumstances.
1752 Automation Manager - Different result from Automatic Extraction. Not allfeatures are extracted.
1781 Single cut internal arc sawing - Leads only on first arc.
1788 Automation Manager - Configuration - Disable Screen updates has noeffect when selected.
1789 Error creating solid object for solid simulation.
1792 Nesting - Minimum Gap between Paths - Gap incorrect when a helical
toolpath is inside another toolpath.
1876 Feature Progress Dialog box is too short.
1902 Lathe - Simulation - Enhanced simulation of sub-spindle 3D toolpaths.
1909 Automation Manager - Import Settings - CSV import Field is duplicated infield list after processing.
1926 Automation Manager - If a post file name contains a comma, no NC is
output.
1928 Define Tool - User-Defined Tool - Diameter and Length not picked up
Correctly.
1932 Add-Ins - Reverse Side Nesting - Nesting Information - When using
Nesting Information on a drawing with reverse side nesting multiple
sheets are created.
1942 Automation Manager - 'Runtime Error. R6052 - pure virtual function call'when path to styles differs from the setting in Home | Settings |Configure ► Folders.
Vero Software Limited

www.alphacam.com

If “Take Account of Previous
Machining” is checked, the“XY stock to be Left” and“Z Stock to be Left” fields areboth disabled.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.

Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Moves between work planes
are now visible in simulation.
Fixed.
Fixed.
Fixed.
Fixed.

Fixed.

24 of 38

: 2016 R2 新機能紹介

2016 R2

1954 Automation Manager - In the output drawings tools are sometimes
incorrectly ordered.
1960 Part Modeler - CAD Import -Export - Alphacam link buttons not working.
1966 Lathe - Solid Simulation - Turret orientation is rotated by 90 degrees.
1967 Rough/Finish - Incorrect output when specified cuts are used along with
rapid being below material top.
1969 Automation Manager - Onepost - Stops working and crashes withapp.selectpost error if outputting with a onepost.
1985 Material - Associate for Auto update - When material is set for auto
update, only half the part is cut.
1988 Nesting - Text - Nesting fails when common lines are found in text ofparts.
2127 Machine - Clamps/Fixtures - Select all on Pop Up/Down Clamps doesn't
work.
2133 Rough or Finish / Cut Shape - Oscillation - NC Output - Loop created in NC
code.
2140 Lathe - Balanced Finishing - Second number in 3 digit sequence isincorrect.
2155 Lathe - Finishing - When using the same tool as roughing, a toolpath
cannot be applied.
2157 Automation Manager - Nesting - Special functions settings retained.
2158 Automation Manager - Unhandled exception - Tool Sorting - Procedure
not found or invalid name.
2166 Automation Manager - Layer mapping setup - Crashes when expanding aninvalid/corrupted or a newer version machining style.
2182 Rough or Finish - Helical Interpolation - XY stock - On Danish systems -/+ isreversed. Related to decimal separator in region settings.
2187 Auto-Align Part - Has no effect on some parts.
2188 Automation Manager - Unhandled Exception related to Auto Align.
2193 Simulation - Collision of tool shank is shown as material colour. This isinconsistent with the behaviour in previous releases.
2194 Automation Manager - Tool Ordering - Changes have no effect until
Automation Manager is restarted.
2211 Radial Menu - Alphacam stops working / crashes.
2236 Reports - No scrap reported on nested sheet.
2238 Reports - Drilling operation causing incorrect scrap value, sometimes
negative.
2239 Reports - Incorrect scrap and time calculation related to manually nested
parts.
2240 Reports - Scrap is incorrectly calculated by tool centre.
2241 Simulation - Error creating solid object for simulation. Certain geometries
fail to create a solid for simulation.
2250 Machine - Insert Program Stop - Extra operation created when program
stop is moved to an operation with multiple sub operations.
2251 Rough or Finish - Automatic Support Tags - Negative stock is causing
rapids to safe Z at the tags.
2255 Reports - Cycle Time is incorrect with Auto Z. 100% Scrap reported.
2266 Automation Manager - Feature Extraction with Query has a different
result from Automatic Extraction.
Vero Software Limited

www.alphacam.com

Tool Ordering tab supersededby Machining Order tab.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.

25 of 38

: 2016 R2 新機能紹介

2016 R2

2427
2434
2439
2441

Simulation - Single Step – Lead -in is ignored when a single step is used.
Panelling - Incorrect Trimming of Geometries.
Lathe - Z Contour Roughing - NC Output - Down Feed is at Cut Feed speed.
Stone - Cut Surfaces/Solids with Disk - 'Join Paths With Arcs' option
cannot be disabled.
2462 Styles - When a style contains Auto Z drilling, there is an error when
editing. 'Which Holes' selection changes.
2489 Stone - Simulation - Guard is simulated with incorrect orientation.

2492 Stone - Cut Surfaces/Solids With Disk - The links created using "Specify
moves between cuts" are incorrect shape.
2494 Advanced 5 Axis - Global co-ordinates are not used when using acylindrical retraction plane.
2505 Automatic Extraction / Extract Solid Body Outlines - Regression from 2015
R1. Incorrect geometry shape caused by Parasolid error.
2509 Program Stop - OPN variable is not correct when using the STOP
operation.
2517 Stone - Cut Surfaces/Solids with Disk - Roughing - Bi-directional selection
doesn't have any effect.
2619 Solid model properties - Under certain circumstances these are not all
displayed or are duplicated. There is no efficient method of copying allproperties to the clipboard.
2629 Automation Manager - Nesting assumes there are toolpaths being nested.
2663 Automation Manager - Multidrill - Error 'Multidrill Add-in not loaded'.
2669 Lathe - Solid Simulation - User-defined tools are not displayed correctly.
2672 Lathe - Display Options - Material Cut - When complex user-defined tools
are used, incorrect material is shown.
2712 Nesting - 'The following parts are invalid. If you continue they will not be
nested'. Related to internal geometry elements touching external
geometry / common lines.
2715 Multidrill - Not using slave drills. All holes are drilled using only one tool.
2720 Multidrill - Not saving user settings (for example, machining parameters,
tolerances) to the database on 64-bit version.
2844 Rough/Finish - Using a small overlap on lead-in or lead-out moves results
in an incorrect toolpath.
2845 Clipboard - API Drawing.SaveAs - Error "DISK FULL! Change disk or save toa different drive" is displayed when saving a big drawing.
2854 API - Reports - Set objFiles = rptJob.ExportReports returns nothing.
2864 Convex tip tool doesn't convert to Alphacam correctly.
2914 Automation Manager - Custom macro fails when LICOMDIR is located ona network drive.
2932 Automation Manager - "What to Extract values" is ignored. Contour andDrillable Holes are always extracted.
3106 Automation Manager - Incorrect output when nesting with multiple
sheets in one job. Only one NC file and one drawing is output whennesting onto multiple sheets.
Vero Software Limited

www.alphacam.com

Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Saw guard will no longer be
displayed when clicking
toolpath elements.
It will be displayed in simulator
as before.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.

Fixed.
Fixed.
Fixed.
Fixed.
Fixed.

Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.
Fixed.

26 of 38

: 2016 R2 新機能紹介

2016 R2

3115 Automation Manager - Setting of Part Origin produces a poor result whencombined with Extract Face options.
3244 Panelling - Support for cut-outs.

Vero Software Limited

www.alphacam.com

Fixed.
New checkbox added to the
Panelling dialog.

27 of 38

: 2016 R2 新機能紹介

2016 R2

Appendix A - 2016 R2 での API 改造
Expose Nesting Text Placement
Example:Public Sub PlaceTextInPathSample()' To use the "PlaceTextInPath" command, you must have a reference' to "Alphacam Geometry Utilities" - this is done through the' Tools | References' menu of the VBA Editor
Dim geoUtils
Dim geo2D
Dim pthTest
Dim txtInsert

As AlphaCAMUtilities.GeoUtilities
As geo2D
As PathAs Text' Create a simple geometry - this must be a closed profile
Set geo2D = ActiveDrawing.Create2DGeometry(0, 0)
With geo2D.AddLine 100, 0.AddArcPointRadius 100, 10, 5, False, False.AddLine 0, 10.AddArcPointRadius 0, 0, 40, False, True
Set pthTest = .Finish
End With' Get the Geometry Utilities interface from the current drawing
Set geoUtils = ActiveDrawing.GeoUtilitiesInterface' Place the text inside the geometry
Set txtInsert = geoUtils.PlaceTextInPath("Text", pthTest)' Retuned "txtInsert" is an Alphacam Text object which can be' manipulated if needed
End Sub

Feature API calls for “From Faces” Orientation type
SolidExtraction2 Object
Read/Write Property: FromFacesSelection As FromFacesSelectionTypeEnum (one of FromFacesAllFaces,
FromFacesAllPlanarFaces or FromFacesSelectedFaces)
When using the “From Faces” orientation type, find contours on all faces, all planar faces, or selected faces (see below)
respectively.
Read/Write Property: FromFacesExtractSolidBodyOutline As Boolean
When using the “From Faces” orientation type, this property controls whether the Solid Body outline is extracted or not(in addition to the contours on faces).
Read/Write Property: FromFacesOptimisePlanes As Boolean
When using the “From Faces” orientation type, if this property is TRUE, parallel contours are put on a single work-planewith adjusted Z-levels, if it is FALSE, each contour is put on a separate work-plane such that its top Z-level is 0.
Method: SetFromFacesSelectedFaces(SolidSelector)

Vero Software Limited

www.alphacam.com

28 of 38

: 2016 R2 新機能紹介

2016 R2

When using the “From Faces” orientation type with FromFacesSelection set to FromFacesSelectedFaces, use the faces in
the given SolidSelector object.
ExamplesExtract contours using 'FromFaces' orientation and 'AllPlanarFaces'
Public Sub ExtractContoursFromAllPlanarFaces()
Dim SF As SolidFeatures
Set SF = App.ActiveDrawing.SolidInterface
Dim SE As SolidExtraction2
Set SE = SF.SolidExtraction2
SE.FindContours = True
SE.FindDrillHoles = False
SE.Source = FeatureAllBodiesExtracted
SE.FeatureExtractionMode = FeatureExtractionModeContour
SE.Tolerance = 0.001
SE.Step = 0
SE.OpenAirPocket = False
SE.MaxDrill = 100
SE.Orientation = FeatureFromFaces2
SE.FromFacesExtractSolidBodyOutline = False
SE.FromFacesOptimisePlanes = True
SE.FromFacesSelection = FromFacesAllPlanarFaces
SF.AutoExtract2 SE
End Sub

Extract contours using 'FromFaces' orientation and 'SelectedFaces'
Public Sub ExtractContoursFromSelectedFaces()
Dim SF As SolidFeatures
Set SF = App.ActiveDrawing.SolidInterface
Dim SE As SolidExtraction2
Set SE = SF.SolidExtraction2‘Ask user for faces to get contours from
Dim Selector As SolidSelector
Set Selector = SF.Selector
Selector.What = FeatureSelectFace
Selector.Select "Please select some faces"
SE.FindContours = True
SE.FindDrillHoles = False
SE.Source = FeatureAllBodiesExtracted
SE.FeatureExtractionMode = FeatureExtractionModeContour
SE.Tolerance = 0.001
SE.Step = 0
SE.OpenAirPocket = False
SE.MaxDrill = 100
SE.Orientation = FeatureFromFaces2
SE.FromFacesExtractSolidBodyOutline = False
SE.FromFacesOptimisePlanes = True
SE.FromFacesSelection = FromFacesSelectedFaces
SE.SetFromFacesSelectedFaces Selector
SF.AutoExtract2 SE
End Sub

Vero Software Limited

www.alphacam.com

29 of 38

: 2016 R2 新機能紹介

2016 R2

Feature API – AutoExtract and AutoExtract2 Update
Previously when configuring parameters for the AutoExtract or AutoExtract2 methods, if the Source property was set to“FeatureSelectedBodiesExtracted” or “FeatureSelectedFacesExtracted” the user would be prompted to select entities but
would not be able to do so. Now, if either of these Source types are used, then Alphacam will look at the “MainSelector”
object to determine which Bodies/Faces to use. This enables the API user to prompt the user for bodies/faces to use andthen pass them to the AutoExtract methods.
Example'Extract contours in flat-land from selected bodies
Public Sub ExtractContoursOnSelectedBodies()
Dim SF As SolidFeatures
Set SF = App.ActiveDrawing.SolidInterface
Dim SE As SolidExtraction2
Set SE = SF.SolidExtraction2‘Ask user for Solid Bodies to use
Dim Selector As SolidSelector
Set Selector = SF.Selector
Selector.What = FeatureSelectBody
Selector.Select "Please select some solids"‘Copy the selection to the ‘MainSelection’Selector.CopyToMainSelection
SE.FindContours = True
SE.FindDrillHoles = False
SE.FeatureExtractionMode = FeatureExtractionModeContour
SE.Orientation = FeatureFlatLandOrientation2
SE.Source = FeatureSelectedBodiesExtracted
SE.Tolerance = 0.001
SE.Step = 0
SE.OpenAirPocket = False
SE.MaxDrill = 100‘ Auto extract the contours on the bodies selected by the user
SF.AutoExtract2 SE
End Sub

Drawing Object
Method: SimplifySTL(double SimplifyPercentage, double ToleranceScaleFactor, Boolean KeepOriginal)
Simplifies the selected STL models in the Active Drawing. SimplifyPercentage must be between 0 and 100 exclusive andToleranceScaleFactor must be greater than 0. The SimplifyPercentage is approximate because it will depend on themodel and the ToleranceScaleFactor. Setting it to 50 should give a model with roughly half the number of faces as before.
If KeepOriginal is True, then the simplified model is added to the drawing (the original STL model is unmodified), if it isFalse, then the faces on the existing model will be replaced with the simplified faces.
ExamplesPublic Sub SimplifySelected()' Ask user to pick some STL models
App.ActiveDrawing.UserSelectMultiAddinObjects2 "Please select STL models to be simplified", 0,"InputSTL"' Simplify the selected models by 50% replacing the original models
App.ActiveDrawing.SimplifySTL 50#, 1#, False
App.ActiveDrawing.RedrawShadedViews
End Sub

Vero Software Limited

www.alphacam.com

30 of 38

: 2016 R2 新機能紹介

2016 R2

Public Sub SimplifyAll()' Simplify all STL models in the drawing.
Dim s As STL
Set s = App.ActiveDrawing.STLInterface
Dim part As stlpart
For Each part In s.Parts
part.Selected = True
Next
App.Frame.ProjectBarUpdating = False
App.ActiveDrawing.ScreenUpdating = False' Simplify the selected models and keep the originals.
' The simplified STL models will be added to the drawing.
App.ActiveDrawing.SimplifySTL 25#, 1#, True
App.Frame.ProjectBarUpdating = True
App.ActiveDrawing.ScreenUpdating = True
End Sub

Drawing.HasPanelingSheets and Drawing.MoveNestedSheetAndPartsToDrawing
Drawing.HasPanelingSheets
Returns true if there are any sheets created using the Edit|Panelling command. Otherwise false.
Drawing.MoveNestedSheetAndPartsToDrawing (SheetPath As Path, NewDrawing As Drawing, CopyBeforeMove As
Boolean)This function moves a nested sheet and the parts inside it to a temp drawing.
ExampleSub MoveNestedSheetToDrawing()
Dim drw As Drawing
Set drw = App.ActiveDrawing' Check if drawing has panelling sheets on it
If Not drw.HasPanelingSheets Then
Dim path As path
' Ask user to pick a nested sheet geometry
Set path = drw.UserSelectOneGeo("Please, select a nested sheet geometry")' Move sheet and parts to a temp drawing
Dim TempDrw As Drawing
Set TempDrw = App.CreateTempDrawing
drw.MoveNestedSheetAndPartsToDrawing path, TempDrw, False
TempDrw.SaveAs ("C:\Temp.ard")
End IfEnd Sub

Nesting Sheet Database - Command to Insert Sheet at Point
ExamplePublic Sub Test()
Dim N As Nesting
Set N = Nesting
Dim sdb As SheetDatabase
Set sdb = N.SheetDatabase
Dim s As DatabaseSheet
Set s = sdb.FindSheet("Holey")
Dim p As Paths
Set p = s.InsertInActiveDrawingAtPoint(10, 100)
End Sub

Vero Software Limited

www.alphacam.com

31 of 38

: 2016 R2 新機能紹介

2016 R2

API – Ability to Edit Styles
New API - MillSubStyle.ShowDialogBox()
ExampleSub EditStyleUsingDialogBox()
Dim NewStyle As MillStyle
Dim StyleToEdit As MillStyle
Dim SubStyle As MillSubStyle
Dim SaveNewStyle As Boolean
SaveNewStyle = False' Start a new Style
Set NewStyle = App.CreateMillStyle' Get a style to edit
Set StyleToEdit = App.MillMachiningStyles(1)For Each SubStyle In StyleToEdit.MillSubStyles' Show dialog box to edit the style
If SubStyle.ShowDialogBox Then
'User Pressed OK, add modified substyle to the new style
NewStyle.AddOp SubStyle.GetMillData, SubStyle.Tool, SubStyle.GetLeadData
SaveNewStyle = True
End IfNext SubStyle' Save Modified Style
If SaveNewStyle Then
NewStyle.SaveAs App.LicomdirPath & "\LICOMDIR\Styles\ModifiedStyle.ary"
End IfEnd Sub

API - For SetAttributeForNextElement to store more than one attribute
ExamplePublic Sub ApplyMultipleAttributes()' Create and Set MillData
App.SelectTool "Flat - 12 mm + holder.art"
Dim MD As MillData
Set MD = App.CreateMillData
MD.SafeRapidLevel = 50
MD.RapidDownTo = 5
MD.MaterialTop = 0
MD.FinalDepth = -10' Create a manual toolpath
Dim MTP As MillManualToolPath
Set MTP = MD.ManualToolPath(100, 100, 0)' Create element without attributes
MTP.Add2DLine 200, 100' set multiple attributes for next element
MTP.SetAttributeForNextElement "MultiAttribute1", 1
MTP.SetAttributeForNextElement "MultiAttribute2", 2
MTP.SetAttributeForNextElement "MultiAttribute3", 3' Create a new element. All attributes will be assigned to it
MTP.Add2DArcPointCenter 200, 200, 200, 150, False' New element, create a new set of attributes
MTP.SetAttributeForNextElement "MultiAttribute4", 4MTP.SetAttributeForNextElement "MultiAttribute5", 5
MTP.SetAttributeForNextElement "MultiAttribute6", 6' Create a new element. All new attributes will be assigned to it
MTP.Add2DLine 100, 200
Dim PS As Paths
MTP.Finish
End Sub

Vero Software Limited

www.alphacam.com

32 of 38

: 2016 R2 新機能紹介

2016 R2

New Methods to Help Optimise Add-Ins
Drawing Object
Method: GetGeosFrom(long Index)
Returns: Paths Collection containing all the paths in the Drawing from Index onwards.
If an add-in creates or imports geometries and needs to apply some processing on the geometries most recently added,
then this new API call can be a more efficient method than getting a collection of all geometries in the drawing, especially
if the Drawing contains a large number of geometries.
Example‘ Add 10 random rectangles to the Drawing
Public Sub CreateGeos(drw As Drawing)
Dim i As Integer
Dim x As Integer
Dim y As Integer' Create some random rectangles
For i = 1 To 10
x = CInt(Int((100 * Rnd()) + 1))
y = CInt(Int((100 * Rnd()) + 1))
drw.CreateRectangle x, y, x + 100, y + 100
Next iEnd Sub

Public Sub OriginalMethod()
Dim count As Integer
Dim i As Integer
Dim drw As Drawing
Dim Start, Finish As Double
Set drw = App.ActiveDrawing
drw.Clear True, True, True, True, True, True, True, True
drw.ScreenUpdating = False
Start = Timer
For i = 0 To 1000
' Get count of pre-existing geometries
count = drw.GetGeoCount' Call some method(s) to create / import some new geometries
Call CreateGeos(drw)' Get a collection of all geometries
Dim AllPaths As Paths
Dim APath As PathDim j As Integer
Dim total As Integer
Set AllPaths = App.ActiveDrawing.Geometries
total = AllPaths.countFor j = (count + 1) To total
Set APath = AllPaths.Item(j)APath.ColorRGB = 255
Next
Next
drw.ScreenUpdating = True
drw.RedrawShadedViews
Finish = Timer
MsgBox "Took " & (Finish - Start) & " seconds"
End Sub

Vero Software Limited

www.alphacam.com

33 of 38

: 2016 R2 新機能紹介

2016 R2

Public Sub Optimized()
Dim count As Integer
Dim i As Integer
Dim Start, Finish As Double
Dim drw As Drawing
Set drw = App.ActiveDrawing
drw.Clear True, True, True, True, True, True, True, True
drw.ScreenUpdating = False
Start = Timer
For i = 0 To 1000
' Get count of pre-existing geometries
count = drw.GetGeoCount' Call some method(s) to create / import some new geometries
Call CreateGeos(drw)' Get a collection of the new geometries
Dim newPaths As Paths
Dim NewPath As Path
Set newPaths = App.ActiveDrawing.GetGeosFrom(count + 1)
For Each NewPath In newPaths
NewPath.ColorRGB = 255
Next
Next
drw.ScreenUpdating = True
drw.RedrawShadedViews
Finish = Timer
MsgBox "Took " & (Finish - Start) & " seconds"
End Sub

In the Optimized() method, the new call ‘GetGeosFrom’ will create a collection of just the Paths we need compared toOriginalMethod () method’s use of drw.Geometries that returns a collection of everything – which could be thousands ofgeometries. In OriginalMethod(), the loop will take longer and longer to execute as the number of geometries in the
Drawing increases.

Method: GetToolPathsFrom(long Index)
Returns: Paths Collection containing all the tool paths in the Drawing from Index onwards.
If an add-in needs to apply some processing on the tool paths most recently added, then this new API call can be a more
efficient method than getting a collection of all tool paths in the drawing, especially if the Drawing contains a large
number of tool paths.
See GetGeosFrom for an example.

Method: GetSplinesFrom(long Index)
Returns: Splines Collection containing all the splines in the Drawing from Index onwards.
If an add-in needs to apply some processing on the splines most recently added, then this new API call can be a more
efficient method than getting a collection of all splines in the drawing, especially if the Drawing contains a large numberof splines.
See GetGeosFrom for an example.

Vero Software Limited

www.alphacam.com

34 of 38

: 2016 R2 新機能紹介

2016 R2

Appendix B - 64-bit VBA Macros
Introduction
With the introduction of the 64-bit version of Alphacam, it was necessary to upgrade to Microsoft Visual Basic forApplications 7.0 (VBA7). VBA 7 is now used in the 32-bit and 64-bit Alphacam and AlphaEdit applications.
All Alphacam add-ins installed with Alphacam 2015 R2 have been updated to work with Visual Basic 7.0 in both 32-bit and64-bit Alphacam (with the exception of APM and CDM).
If you develop your own add-ins and want them to work with 64-bit Alphacam they must be tested because they may notwork without modification. Specifically if your add-in uses any of the Windows API functionality it will require some
updates before it can run.
The main reason why VBA code needs to be updated is because many of the Windows API function parameter types arepointers (memory location addresses) and these need to be stored as 64-bit values when running in a 64-bit environment,
and 32-bit values in a 32-bit environment. Lots of existing VBA 6 code uses 32-bit values to store pointers which won't
work in a 64-bit environment.
In VBA 7, you must update all Windows Application Programming Interface (API) statements (Declare statements) towork with the 64-bit version. You may also need to update the definitions of the user-defined types that are used bythese statements as well as code that calls these functions.
Microsoft have a download which includes Windows API Declarations and Constants for Visual Basic which has been
updated for 64-bit here: http://www.microsoft.com/en-us/download/details.aspx?id=9970
After you download and install it then you can refer to the file here: "C:\Office 2010
DeveloperResources\Documents\Office2010Win32API_PtrSafe\Win32API_PtrSafe.TXT". It contains a lot of useful
declarations you can copy and paste from.
Another useful article can be found here: https://msdn.microsoft.com/en-us/library/ee691831(office.14).aspx

Fixing Declare Statements
The first thing you are likely to have to do is to update Declare statements with the PtrSafe keyword. This tells VBA 7 thatyou believe the function call is safe to call in a 64bit environment (it doesn’t mean that it necessarily is though!)
In an existing VBA 6 macro you may have a statement like this...
Private Declare Function GetUserDefaultLCID Lib"kernel32" () As Long
It declares that we want to use a function called GetUserDefaultLCID inside Kernel32.dll that takes no parameters andreturns a Long. This function doesn't use any pointer parameters so it can be simply updated to include the PtrSafe
keyword...
Private Declare PtrSafe Function GetUserDefaultLCID Lib "kernel32" () As Long
No other changes are required (unless you need to make your macro work with VBA 6 and VBA 7 - see later).

Vero Software Limited

www.alphacam.com

35 of 38

: 2016 R2 新機能紹介

2016 R2

Fixing functions with pointer types
Here is another example from a VBA 6 macro...
Private Declare Function RegOpenKeyEx Lib"advapi32.dll" Alias "RegOpenKeyExA"(ByVal hKey As Long,ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal
samDesired As Long,phkResult As Long) As Long
This function is used to open a registry key. Referring to the Win32API_PtrSafe.txt we can update this to the following...
Private Declare PtrSafe Function RegOpenKeyEx Lib "advapi32.dll"
Alias"RegOpenKeyExA" (ByVal hKey As LongPtr,ByVal lpSubKey As String, ByVal
ulOptions As Long, ByVal samDesired As Long,phkResult As LongPtr) As Long
In this case, in addition to the PtrSafe keyword, two of the parameters are pointers and need to change type from 'Long'
to 'LongPtr'. 'LongPtr' is a special type that will automatically be replaced by a type large enough to hold a pointer value
for the current run-time environment. In other words if you are running 64bit Alphacam, a 'LongPtr' will be a 64bit value,
and if you are running 32bit Alphacam it will be a 32bit value.
The code that uses this function needs to be updated too. In VBA 6 the original code surrounding this function was…
Public Function gb_ExportRegKey(ByVal lKeyRoot As KeyRoot,ByVal sKeyPath As String,
ByVal sFileName As String) As Boolean
Dim lngHKey As Long
Dim lngRet As Long
lngRet = RegOpenKeyEx(lKeyRoot, sKeyPath, 0&,KEY_ALL_ACCESS, lngHKey)In VBA 7 it should be…
Public Function gb_ExportRegKey(ByVal lKeyRoot As KeyRoot,ByVal sKeyPath As String,
ByVal sFileName As String) As Boolean
Dim lngHKey As LongPtr
Dim lngRet As Long
lngRet = RegOpenKeyEx(lKeyRoot, sKeyPath, 0&,KEY_ALL_ACCESS, lngHKey)In this case, just the type of the HKEY returned by the RegOpenKeyEx function needs to be updated from a Long to a
LongPtr.

VBA 6 Backwards compatibility
As mentioned above there is some additional work to do if you wish to maintain backwards compatibility with VBA 6. If
you install a macro in the \LicomDir\VBMacros folder for example, it may be used by Alphacam 2015R1 (or older) as well
as Alphacam 2015 R2. Unfortunately the new keywords 'PtrSafe' and 'LongPtr' were introduced in VBA 7, and VBA 6
doesn't know what they mean.
To allow your VBA code to work in both VBA 6 and VBA 7 it is necessary to use a Conditional Compilation test for VBA 7
as follows: #If VBA7 Then
Private Declare PtrSafe FunctionGetUserDefaultLCID Lib "kernel32" () As Long
Private Declare PtrSafe FunctionRegOpenKeyEx Lib "advapi32.dll" Alias"RegOpenKeyExA"(ByVal hKey As LongPtr, ByVal lpSubKey As String, ByVal ulOptions
As Long,ByVal samDesired As Long, phkResult As LongPtr) As Long
#Else
Private Declare Function GetUserDefaultLCID Lib"kernel32" () As Long

Vero Software Limited

www.alphacam.com

36 of 38

: 2016 R2 新機能紹介

2016 R2

Private Declare Function RegOpenKeyEx Lib"advapi32.dll" Alias "RegOpenKeyExA"(ByVal hKey As Long,ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal
samDesired As Long,phkResult As Long) As Long#EndIf
It is also necessary to 'wrap' any instances of 'LongPtr' in the code. In the case of the gb_ExportRegKey function above it
would need to be modified as follows:
Public Function gb_ExportRegKey(ByVal lKeyRoot As KeyRoot,ByVal sKeyPath As String,
ByVal sFileName As String) As Boolean#If VBA7 Then
Dim lngHKey As LongPtr#Else
Dim lngHKey As Long#End If
Dim lngRet As Long
lngRet = RegOpenKeyEx(lKeyRoot, sKeyPath, 0&,KEY_ALL_ACCESS, lngHKey)

Testing Macros
Attempting to load macros into Alphacam that are not compatible with 64bit VBA 7 will result in one or more warning
dialog boxes appearing. The last of these dialog boxes contains a summary of all the macros that failed to compile. You
can copy this information to the clipboard and optionally choose to disable these macros.
You can use the VBA Editor Debug | Compile <Macro name> command to help you find the code and declarations thatneed to be updated.

Active X Components
If you have used any of Microsoft’s Active X objects to add advanced User Interface controls to your VBA Macro you will
unfortunately run into additional difficulties. Microsoft has not made 64 bit versions of these components (seehttps://msdn.microsoft.com/enus/library/office/ee691831(v=office.14).aspx#odc_office2010_Compatibility32bit64bit_ActiveXControlCOMAddinCompat
ibility )…
"This includes the common controls of MSComCtl (TabStrip, Toolbar, StatusBar, ProgressBar, TreeView, ListViews,
ImageList, Slider, ImageComboBox) and the controls of MSComCt2 (Animation, UpDown, MonthView, DateTimePicker,
FlatScrollBar)"
Unfortunately there aren't many options ... either removing the component (and simplifying the interface) or seeking analternative solution. Regarding alternatives ... some of the VBA components inside Alphacam use Codejock's Xtreme
Suite Pro Active X components, which are available in 32 and 64bit. This is a commercial product so there is cost involved.
It is recommended that you contact support if you would like more information.

Vero Software Limited

www.alphacam.com

37 of 38

: 2016 R2 新機能紹介

2016 R2

Appendix C – C# Add-Ins
Alphacam will search for C# DLLs in two specific folders; “Dot NetAdd-Ins” in the same folder as the Acam.exe and“…\LicomDir\DotNetAdd-Ins”. Each C# add-in must include a text file with the extension “.acamaddin” which Alphacam
will read to determine information about the C# add-in, including how and when it should be loaded.
A typical .acamaddin file contains the following: -$1 ' Name of .Net DLL to load, no path or extension.
ExampleAddIn$2 ' 1 to always load, 0 to show in Utils | Add-Ins dialog box
0$3 ' NoDefaultLoad, = 1 don't load if user registry entry not set. (Only used if $2 = 0)
1
$4 ' 1 if this is an Extra Cost Option
0$10 ' Load for Mill, 1 = yes, 0 = no1
$20 ' Load for Router, 1 = yes, 0 = no1
$30 ' Load for Stone, 1 = yes, 0 = no1
$40 ' Load for Lathe, 1 = yes, 0 = no1
$50 ' Load for Profiling, 1 = yes, 0 = no1
$60 ' Load for Wire, 1 = yes, 0 = no1
The entry under $1 must be the name of the C# DLL without extension. The DLL must be in the same folder as
the .acamaddin file itself. (The files can be in sub-folders of one of the “DotNetAdd-Ins” directories).
Each C# add-in must include a reference to “Interop.AlphaCAMMill.dll” (which is installed in the same folder as acam.exe),
and implement a public class called “AlphacamEvents” with a constructor defined as taking a single IAlphaCamApp
parameter. Alphacam will call this constructor when the add-in is loaded.
From the IAlphaCamApp interface the add-in can retrieve the Frame interface and use the method “CreateAddInInterface”
to create an AddInInterfaceClass which can be used to add event handlers such as InitAlphacamAddIn, BeforeInputCad,
AfterMachining, etc. The InitAlphacamAddIn event handler can be used to add new commands to the Alphacam interface.
In addition to supporting to events, an add-in can respond to various notifications such as when different kinds of entities(geometries, splines, surfaces, etc.) are added or modified. The “CreateAddInNotifications” method on the Frameinterface can be used to create various notification event handlers.

Vero Software Limited

www.alphacam.com

38 of 38