CADVANCE News

December 2003                                  Dec. 2003 Issue


For all the latest Info - www.cadvance.com  

 

Merry Christmas!


Christmas Special sales

If you place an order now, you will get the following special discounts.

CADVANCE 2002 Full, Light versions and Add-On's ----- 20% off list price

AE Tools Full, Light versions and Add-On's ----------------- 20% off list price

Space Management and Asset Management ------------------ 20% off list price

Connect IT --------------------------------------------------------- 20% off list price

All upgrades ------------------------------------------------------- 10% off list price

The above discount rates are applied to quantity discount prices as well.

Please visit Order Products On-line for the list prices and your orders. We will apply the above discount rate to your order total and send you a confirmation email for your total sum when we receive your on-line order

Note: This December special sales promotion is eligible only in domestic US, Canada and Mexico.


F I T, Inc. Office has been moved.

The new address is:

780 N. Euclid St., Suite 206, Anaheim, CA 92801

Telephone and Fax numbers remain the same. As of Dec. 2, the phone lines in the office are not installed yet. So, if you need to contact us, please send us your email at cadvance@fitinc.com


Articles

 

We are posing the two articles contributed by Ms. Janise Harmon for Nov. News and by Mr. Alexander Medwedew for Oct. News. We appreciate the contributions and the articles are excellent. So, if you missed it in the past two months news, please visit the articles. 

 

CADVANCE 2002 New Features Review:                      

       Contributed by Ms. Janise Harmon,  BayCad Services

 

The other macro language for CADVANCE:                          

       Contributed by Mr. Alexander Medwedew,  Visual Engineering

 

 

 

===================================================================

CADVANCE 2002 – New Features Review that Benefit You!

By Janise Harmon at BayCAD Services

OK, so you upgraded to the new CADVANCE Version 2002, but have you explored all the new features yet? Thought a little warm-up was in order to help all users take advantage of some of the great tools you may not have explored as yet.

First and foremost, make sure you’ve downloaded the latest Service packs from the FIT website. These Service Packs enhance the software performance with upgrades. The only thing you need to re-set is your toolbar, so fear not…install them.

The Mouse

Some of my favorite new features are located on the mouse (button 2). These are the quick editing tools you can utilize when an object is highlighted. The best part is, you can use these tools on multiple items now, not just single selections. To do this, select the multi-items you wish to edit and when you are ready to select the last item in the group, simply hold down your shift key as you press button 2 on the mouse. Very slick new feature and a real time saver!

In addition, there is a new command on the button 2 editing - Set Properties. This allows you to set the layer, color, line weight and line style of the selected object to the Status Bar at the bottom of the screen and instantly default to those settings. This saves a great deal of time querying when you simply want to match existing objects in a drawing.

The Virtual Tablet

So what the heck is it anyway?

Every CADVANCE user utilizes a library of symbols, macros (hopefully) and/or add on programs they either purchased or developed in-house. Providing a simpler method of easy access to these tools can greatly increase productivity, and that’s exactly what the Virtual Tablet does.

Virtual Tablet works just like a hardware tablet, but is utilized on your graphics screen. It provides the ability for symbol files, macros, programs or file names to be inserted into a 6 x10 grid so you can quickly view up to 60 items per page (you can add multiple pages as needed). In addition to being able to create and customize tablets with your own symbols, you can also select from over 1000 symbols included with Virtual Tablet.

Text Box:  You can choose which tablet(s) you want to work with and graphically select which item on the tablet to activate (this is done easily via the Utility – Application command on the Main Menu). If your item is a symbol, Virtual Tablet provides for the placement and manipulation of your symbol. If it is a macro, program, or file, Virtual Tablet will execute or open the file.

The samples provided include hundreds of useful symbols and their associated Virtual Tablet files (see the Virtual Tablet User Guide for further information).

The User Guide is located in the CADVANCE Folder under the 'Virtual Tablet sub-directory.

It’s easy and fast to create these VT screens filled with entire symbol directories, macro or drawing files, and a great way to quickly utilize them. If you haven’t checked out the Virtual Tablet, we recommend that you do!

Symbol’s Revisited

There are some new features and functions under the Symbol command on the Main Menu, and here’s a quick overview:

Place -                                                    Places symbols in the drawing while letting you scale or rotate them.

Ok, so you all know how to place a symbol, but there are some nice, new features available when you do.

If the “Inherit Layer Properties” box is checked, the symbol inherits the current layer color, line weight and line style. That is, the current layer color, weight and style are attached to that instance of the symbol.

If “Adjust Symbol Scale” is checked, CADVANCE automatically scales the symbol according to the current drawing’s “smallest unit” value. For example, a 36” door symbol created in a drawing with 1/1024 smallest unit will show up as 36” door in a drawing with 1/8000 smallest unit when it is measured. Very nice for those of you who have to utilize DXF or DWG files! Of course, if you query that symbol, the X and Y scale will read out a little strange (but true), but the symbol will be the correct size at any smallest unit.

Once these boxes are checked in a drawing, they remain active, even if you use the Virtual Tablet to place symbols.

Attributes -                                           Defines default attributes for a symbol.

This defines default attributes for a symbol. Assigning default attributes to a symbol reduces repetitive data entry. You can define as many as sixteen default attributes per symbol.  You define default attributes with a field name (for instance, the field name might be MFG or COLOR or INSTALL_DATE or PART_NO) and a field value. When you use Symbol/Place, Edit/Alter/Open Segment or Utility/Attributes/Edit, default attribute values are entered automatically. If you want to change the value on each placement, leave the default blank and you will be prompted for the input each time you place the symbol. If you later want to edit these values, simply highlight the symbol and go to the new Edit/Symbol Text Attributes command.

Remember to check the Options\Miscellaneous dialog box  “Symbol Text Attributes [  ] Yes” if you want to use this feature and save it to your CADVANCE.INI. There are some new commands in the View menu for attributes also. For specifics on this feature, I recommend that you review the help screens on attributes before you start utilizing it.

Export -                                                  Exports symbols into symbol directory.

This comes in handy when working with files you didn’t create if you need to use the symbols in another file. You can select multiple symbols and will be prompted for a name and directory location for each one (remember though, you might not know where the basepoint is…we don’t have to worry about the creation layer anymore).

Edit Symbol\Group -                            Edits member(s) of symbol or group.

This is a nice new time-saver if you make symbol groups. Let’s say you have 10 entities in a group, and now you want to manipulate one object in that group. This command allows you to do that in the one group instance or in all instances in the drawing. By then selecting the Symbol/Close Edit\Group, the 10 entities once again become a group with the change in place.

Key Map -                                              Creates a key map symbol that has a link to another drawing or places it.

A cool tool that allows you to link and/or open a related drawing by simply double-clicking on a symbol you’ve placed in a drawing. A good link would be from the main drawing directly to a detail sheet or perhaps a subsequent floor plan.

Explore and enjoy all the new tools and feel the benefits of more productive work with CADVANCE Version 2002!

Please remember that BayCAD Services offers 2-day Basic Training classes for new users and 1 day Update Classes for existing users to get up to speed quickly with new features and techniques. We also offer design and translation services if you’re ever in need of assistance. If you have any questions or comments, please feel free to contact me personally.

Janise Harmon, President,

BayCAD Services

POB 9475

San Rafael, CA 94912

Phone:(415) 453-3828

E-mail baycad@att.net.


by Alexander Medwedew
 

In 1993, ISICAD introduced CADVANCE for Windows, which ran on the Microsoft Windows 3.X operating system.  CADVANCE version 5.0 was the first Windows based CAD system to be introduced with a full set of ubiquitous features which included Multiple Document Interface (MDI), common application interface,  clipboard and OLE compatibility.  Also included was a newly designed macro programming interface called CADVANCE Developer Interface (CDI) and CADVANCE Basic Language (CBL) as its macro language.  CDI provided a fully Microsoft Windows compatible interface for most professional programming environments like C that could write a Dynamic Link Library (DLL).  Many of the features introduced in this ground breaking product were not fully matched by CADVANCE's main competition for many years.

Invoked from the CADVANCE utility menu, CBL provides customization and automation functions right out of the box.  CBL, CADVANCE's default macro language, similar in syntax to Microsoft Visual Basic is also fully Windows compatible.  Direct calls to the Windows API as well as custom DDL's and Active-X objects are well within the scope of its capabilities.

Over the years, CADVANCE users have discovered the benefits of using CBL for creating custom macros that make repetitive or difficult tasks easier to perform.  The built-in macro recorder makes it easy to create reusable functions with a minimum of programming skills.  Running a CBL macro is as easy as picking a shortcut key on the keyboard.

With all of its capabilities, CADVANCE's CBL macro editing environment only provides basic editing and debugging features.  Large applications are difficult to write and CBL macro speed is limited due to being an interpreted language.  Users of CADVANCE LiTe can only run macros created and compiled in the full version and cannot create CBL macros of their own.  

To overcome the limitations of CBL, CDI allows alternative application development environments to be used.   Many popular products that can create Windows compatible DLL's can be used to create custom applications for CADVANCE.  The majority of these products use C as the programming language.  C preferred by software development companies can be difficult to learn and code. 

An alternative to C is a product made by Borland called Delphi.  Delphi, a Rapid Application Development (RAD) environment uses Object Pascal as its language and is easy to use.  Delphi provides a full set of professional features for CADVANCE application development and makes CDI features not available to CBL macros accessible.  A number of applications have been written using Delphi, most notable and used by many CADVANCE users is AETools.  FIT has plans to further utilize Delphi for its other add-on products currently written in C.

Features not directly available to CBL are easily accessible using Delphi.  Custom forms are simple using Delphi's forms editor.  Debugging applications using the Delphi debugger allows rapid detection of programming errors.  The ability to create custom objects known as Auxiliary Objects is only possible by writing a custom DLL.  Delphi allows deployment of functions in a single plug-in library for easy distribution and maintenance of applications.

The gain in speed of custom applications may be the greatest advantage for most custom applications.  CBL macros that seem slow will benefit the most from conversion.  The transition from CBL to Object Pascal requires learning a different programming language.  The CADVANCE specific CDI function calls remain the same and useful macros written in CBL are fairly easy to convert. 

CADVANCE requires Delphi applications to be written as DLL's.  Usually located in the CADVANCE program directory, DLL functions can be invoked from the Utility/Applications menu.  CBL macros and other Delphi DLL's running inside of CADVANCE can have access to these functions as well.  The following would need to be added to the CADVANCE.ini file so that the application would be visible in the Applications menu.

[3rd Party (CADVANCE.ini)]
Multiline &Hello=AuxNew CadvUtils.dll 2D
Multiline &Hello=AuxEdit CadvUtils.dll 3D

Borland Delphi is an important addition to any CADVANCE users set of tools for creating custom CADVANCE applications.  CADVANCE is also a great platform for Delphi developers that are looking to create powerful CAD applications.

CBL (BASIC) version of DrawLine
Sub DrawLine()
Dim i_ret as Integer
Dim l_ret as Long
Dim i_term as integer
Dim i_menu as integer
Dim startPoint as CDI_DD_POINT
Dim endPoint as CDI_DD_POINT

CdiDeleteCursor
i_ret:=CdiGetPoint('Line point #1', startPoint, i_term, i_menu)
i_ret:=CdiGetPoint('Line point #2', startPoint, i_term, i_menu)
i_ret:=CdiObjStartLine(startPoint,CdiGetActLayer(),CdiGetStyle(),CdiGetWeight(),CdiGetCurColor())
l_ret:=CdiObjAddtoLine(endPoint,CDI_DRAWTO)
l_ret:=CdiObjEnd(CDI_TRUE,CDI_TRUE,CDI_OBJECT_COLOR)
End sub

Delphi version of DrawLine
procedure DrawLine;
var
i_ret:integer;
l_ret:LongInt;
i_term:integer;
i_menu:integer;
startPoint:CDI_DD_POINT;
endPoint:CDI_DD_POINT;

begin
CdiDeleteCursor;
i_ret:=CdiGetPoint('Line point #1', startPoint, i_term, i_menu);
i_ret:=CdiGetPoint('Line point #2', startPoint, i_term, i_menu);
i_ret:=CdiObjStartLine(startPoint,CdiGetActLayer,CdiGetStyle,CdiGetWeight,CdiGetCurColor);
l_ret:=CdiObjAddtoLine(endPoint, CDI_DRAWTO);
l_ret:=CdiObjEnd(CDI_TRUE, CDI_TRUE, CDI_OBJECT_COLOR);
end;

Simple Delphi DLL

library CadvUtil;

uses
 Windows,
 SysUtils;

//CADVANCE declarations go here
procedure CdiPutMsg(information_msg: pchar); stdcall;
   external 'CAD1.DLL';

procedure CdiPutInfoMsg(title: pchar; info_msg: pchar); stdcall;
   external 'CAD1.DLL';

//functions and procedures go here
procedure StartApp;stdcall;
begin
  CdiPutInfoMsg('CADVANCE Utilities', 'Hello World');
end;

procedure DllExitHandler(Reason:integer);
Begin

  case Reason of
    DLL_PROCESS_DETACH : ;
    DLL_PROCESS_ATTACH : ;
    DLL_THREAD_ATTACH : ;
    DLL_THREAD_DETACH : ;

  else
  end;

end;

//list the exports here
exports
  StartApp;

begin
  { Perform DLL initialization }
  DLLProc:=@DLLExitHandler;
  DLLExitHandler(DLL_PROCESS_ATTACH);

  CdiPutMsg('Initializing utility module, please wait...');

end.