Upload
others
View
12
Download
0
Embed Size (px)
Citation preview
1
Malerzów, April 28, 2013
Installation & Operating Instructions –
Macro Naming Version 1.0
1. Preliminary remarks
This document is a simplified installation & operating guide for Macro Naming
version 1.0 for Windows XP / 7 (32 or 64-bit) and CATIA V5 in English.
For proper installation and use of this macro it is necessary to meet the following
conditions:
application of CATIA V5 from Release 16 to 23 installed (with such releases the
macro has been tested, if there is any compatibility issues it is recommended to
contact me by email – contact details can be found on the last page).
Microsoft .NET Framework 3.5 or higher installed,
1,0 MB free disk space (recommended location C:\).
2
2. Installation
The installation process starts with extracting the received archive
AB_Naming_DEMO.zip and running the file AB_Naming_DEMO.exe.
In the appearing dialog box press the Next> button to proceed to the choice of
installation path:
3
The recommended location for installation is set to the default "C: \ AB_Designer \
AB_Naming " directory. To change the directory, select the Browse…. Button. The chosen
location will be referred in the later section to as "installation directory". Selection is
confirmed by pressing the Next > button.
At this point, it may be necessary to add the installation file AB_Naming_DEMO.exe to the
list of trusted applications of installed antivirus software, as it can block the installation
procedure.
If the installation was successful, the following window should appear:
Now, exit the installation program by selecting the Finish button. In the event of any
issues it is recommended to contact us us email (contact details can be found on the last page).
Next run the CATIA application. Then go to the window Macros, using:
the first way: Shortcut Alt+F8,
the second way: menu Tools -> Macro ->Macros…
4
In the current window select the Macro libraries… option
Then, in the drop-down menu select VBA Projects and press the Add existing
library… button. Selection dialog box opens:
5
In the dialog box select the EXE_Start.catvba file from the installation directory (by
default „C:\AB_Designer\AB_Naming”) and confirm by pressing the Open button. Now you
are back in the dialog box
Macro libraries:
In the current window in the list with the name Current libraries: confirm with a
double click the path of the new library, whose default name is
„C:\AB_Designer\AB_Naming\EXE_Start.catvba”. After confirmation, you will return to the
Macros dialog box:
The installation process has been completed. By selecting the Run button the macro
starts. Renewed access to this window Macros is possible in two ways:
by shortcut Alt+F8,
from menu Tools -> Macro ->Macros…
Close the Macros window with the Close button.
The following step is to add a button to the toolbar, which allows a quick and easy
start of the Naming macro.
6
The step described below is optional and does not affect the running of the macro and is only
intended to facilitate the access and accelerate its launch. To skip this step, go to Section 3.
Before starting this procedure, close all of its subwindows in the CATIA application
(parts, assemblies, drawings, etc.). The window should look like this:
Now, from the upper menu select Tools -> Customize… – the Customize window
should appear:
7
Go to the Commands tab from the Categories list and select the Macros item, then
press the Show Properties… button. The window will be extended to additional functions:
8
In order to assign an icon to macro, select the „…” button from the bottom of the
window. When the Icons Browser widow appears, select an icon by clicking it and confirm
the selection with the Close button. After returning to the Customize window, go to the
Toolbars tab:
9
By clicking New… name selection window of new toolbar New Toolbar will open,
where under Toolbar Name item enter (for example) the name „AB Naming” and confirm
with the OK button. New toolbar should be now available in the Toolbars list in the
Customize window:
10
With AB Naming selected, click Add commands… button and the list of ready-to-use
commands will be displayed:
From the list choose ABNaming_START and confirm with OK button.
After returning to the Customize window, close it with the Toolbars button. The button has
been added to the new Toolbar.
The macro will start by pressing the ABNaming_START button on the AB Naming
Toolbar which is accessible from each module of the CATIA application which is equal with
using the Run button in the Macros window.
11
3. Start and Description of the Features
Running the macro opens start-up dialog box to select the installation path:
After pressing the Select installation path button for information purposes the macro
will display a dialog box where the „AB_Naming.exe” file is to be selected. After pressing
the OK button, selection dialog box appears:
According to the foregoing, select the „EXE_Start.catvba” file from the installation
directory (by default „C:\AB_Designer\AB_Naming”) and confirm by pressing the Open
button.
The path selecting procedure for the „AB_Naming.exe” file is to be performed only once
during the first start of the Naming macro and each time when the temporary files of the
application (by default C:\Users\User Name\ AppData\Local\Temp) have been removed. This
is the case with using all kind of „cleaning” software for register, system locations and
temporary files. Each subsequent run will be starting with the following step.
Starting the macro (with theABNaming_START button on the AB Naming Toolbar or
with the Run button in the Macros window) opens start-up dialog box:
12
Before starting the macro keep in mind, that the highest position in the CATII tree should be
the CATProduct assembly which contains at least one component (CATPart, CATProduct
orComponent), otherwise the error message will be displayed and the macro will not start. It
is also recommended to save all changes (using the Save Management option).
If all relevant conditions have been completed, all main macros will open after
pressing START button:
Main menu can be separated into three basic areas:
View Port – used for visual control of the assembly status and performed changes,
described in Section 3.1.
Toolkit – menu used to make changes in names of components, described in Section
3.2. Menu shall possess four modes of operation: Replace / Add Text described in
Section 3.2.1. or Rename described in Section 3.2.2.
Selection box of save path – used for selection of save location for changed assembly
and for confirmation or discarding of the applied changes. Described in Section 3.3.
13
3.1. View Port
Structure of an illustrative assembly in the CATII tree and its transfer into the macro
view port is shown in the diagram below:
The macro will not load elements hidden in CATII into the view port (option Hide/Show).
There is, however, an exception to this rule, namely: if a component appears in an assembly
more than once and only one instance is hidden, the component will be loaded into the view
port anyway. In addition, if a repeatedly used component is placed in a hidden location, the
location will be also leaded and changed.
Each component of the CATII tree is displayed in the view port only once and
contains 3 features:
1. File name on disk with extension. Letters A/C/P preceding a colon at the beginning of
the line accordingly mean: Assembly, Component, Part and are related to the type of
the component.
The only exception is Component, as it doesn't create any file on disk. In this case the
first name is the name of an Assembly, in which given Component is placed, then,
after a double colon the Part Number is displayed.
2. Part Number of the CATII tree.
Please note that despite the name “Part Number” there is no need to use only numbers
for it – letters can be used, too.
14
3. Instance Name
The instance name is checked only „to dot”, because each instance used in the session
must have a unique name. If the instance names of repeatedly used components are
different from each other, then the third item is skipped in the view port. In that case,
the Check Instance function is used to control the instance name, described in the next
section.
In order to enable a quick, visual verification of what is happening with the names of
components in the assembly in the view port, a simple underline and colors system has been
created, whereby:
Underlining and marking in green means that all names (file, part and instance) are the
same.
Marking in green without underlining means that the file and part names are the same, only
the instance name is different.
Underlining and marking in red means that the file and part names are the different, but one
of them (the underlined one) is the same as the instance name.
Marking in red without underlining means that all names (file, part and instance) are different.
3.2. Toolkit
There are two buttons visible on the top of the kit:
Reset – used to undo all changes made in the view port to the selected component. It
becomes active when changes have been made in the view port (elements highlighted
in yellow),
Check Instance – used to verify names of component instance repeatedly used in the
session. Indicating a specific location in the view port and using the button opens the
following dialog box:
15
There are three pieces of information displayed: file name and part name that are
shown also in the view port and all instance names (of the same repeatedly used component)
appearing in the assembly.
3.2.1. Replace / Add Text
Mode allowing changing one phrase to another or adding a new one to the name of
file, part or instance.
There are two editable boxes, starting from the top:
Old: – enter here the input phrase (the old one) which is to be changed ,
New: – enter here the out phrase (the new one) which should replace the old phrase or,
if applicable, which has to be added to the old name.
Below the editable boxes there is a frame with two options to select from:
Add at the beginning – selecting this option adds phrase given in the New: window at
the beginning of the old phrase,
Add at the end – selecting this option adds phrase given in the New: window at the
end of the old phrase.
In case of using the option of adding a new phrase to the old name, the box Old: has to be
empty, otherwise the option frame Add at the beginning / Add at the end remains inactive.
There is a frame with three options on the right side: File Name, Part Number and
Instance Name it is used to select the name that is to be changed.
Double click on the white background of the frame immediately selects all three items (File
Name, Part Number, Instance Name).
There are two green buttons below:
Select – allows to select components in the view port that are to be changed,
16
All – automatically applies changes to all components currently located in the view
port.
The Select and All buttons become active once the change scheme has been defined,
i.e. whether the Old: and New: boxes are filled or the New: box only and any of following
option is selected (Add at the beginning / Add at the end) and at least one name will be
chosen from the frame on the right side.
In the demo version the All button is blocked and remains inactive.
Example 1 – adding „AB” phrase at the end of the file and instance name and part
number of two selected components.
Start with entering the „AB” phrase in the New: box, then in the window below mark
Add at the end and in the box on the right side select all three options – File Name, Part
Number and Instance Name.
Now, press the Select button and select any two components in the view port:
17
Finish selection with the End selection button:
Chosen components are highlighted in yellow and their input names are displayed for
checking (after the symbols >:>).
Example 2 – changing the „V001” phrase to „V002” in the name of the file, instance
and part number (for full macro version only).
18
Start with entering the „V001” phrase in the Old: box and in the New: box: „V002”,
then in the window on the right side select all three option Add a t the end and in the bpx on
the right side select all three options – File Name, Part Number and Instance Name. Now,
press the All button:
Similar to the Example 1, the modified components are highlighted in yellow and their
changed names will be displayed.
Selecting any component and pressing the Reset button undo the introduced changes.
3.2.2. Rename
This mode allows to rename file, part and instance and replace existing name with to
any phrase.
19
Starting from the top, there is one editable New: box displayed – the text specified
therein will replace the selected names. The green Read Node button above is closely related
to that function and is used for importing names from the workspace to the New: box.
There is a frame below with four options to select from:
Text – to change selected names will be used phrase from the New: box (any or read
by the Read Node function),
File Name – selected names will be changed to file name,
Part Number – selected names will be changed to part number.
Instance Name – selected names will be changed to instance name.
The frame on the right side (to select File Name, Part Number and Instance Name) and
the Select and All buttons have the same function as in the Replace / Add Text mode.
Example 3 – reading file name of any component and its use for changing the instance
name of the same component.
Start with pressing the Read Node and reading the file name of the component.
Then, in the frame below the New: window select the Text option and in the frame on
the right side select Instance Name. Now, press the Select button and select the same
component in the view port:
20
Similar to the Example 1 and 2, the modified component is highlighted in yellow.
Because of the fact that this part is in multiple use in assembly with different instance names,
its original name is not visible in the view port, but the input one only (after the symbols >:>).
Example 4 – changing the name of the file, instance and part number to the name of
the part in all components (for full macro version only).
Start with selecting the option Part Number in the frame at the bottom and selecting all
three items – File Name, Part Number and Instance Name in the frame on the right side. Now,
press the All button:
21
Marking in yellow tells, as in previews examples, that the macro has modified all
components. The input names (after the symbols >:>) are visible only when they actually
have been changed, i.e. when the input name and the output name differ from each other.
3.3. Location Path Selection Box
All introduced so far changes have been related to the macro interface only and have
not affected assemblies opened in the CATII application. Next and last at the same time step
is saving changes that have been made. In order to do that, select first the save path. This is
done by the Destination Path: box with two yellow buttons:
Select Path – opens location dialog box where ultimately all modified components will
be saved.
Product Path– will automatically select location for editable assembly as save path –
all modified components will be overwritten.
Pressing the yellow OK button saves all modified components in the location
displayed in the Destination Path: box and reloads modified and saved assembly into to view
port:
22
Pressing the red EXIT button closes the macro without saving changes.
A cross symbol in the top right corner that normally closes the window, in this case
restarts the macro and cleans all introduced changes.
4. Macro Personalization
Macro version described in this manual is the most versatile one which offers features
and tools selected for the fastest and most efficient use. There is of course the possibility to
adjust the Naming macro settings or extend the interface to new tools and functions in order
to maximize the functionality and adjust to individual needs or inertial requirements and
databases. The following provides an example for macro individualization for customer
needs:
23
For any questions about personalization it is recommended to contact us by email
(contact details can be found on the last page).
If you have any questions or comments, please contact me at the address below.
Contact address: