副标题:无

作   者:

分类号:

ISBN:9781929629671

微信扫一扫,移动浏览光盘

简介

Summary: Publisher Summary 1 A book/CD-ROM package exploring Visual Basic for Applications (VBA) in AutoCAD, with coverage of basic and advanced topics. Covers the AutoCAD VBA environment, the AutoCAD object-oriented database, working with other applications, VBA toolbox routines, and programming style. The CD-ROM contains sample applications, macros, utilities, and examples for beginning and advanced programming. For AutoLISP and VB programmers, and AutoCAD users. Gibb is chairman of the AutoCAD User Group International Programming Interest Group. Kramer is president of a leading CAD/CAM/CAE supplier. Annotation c. Book News, Inc., Portland, OR (booknews.com)   Publisher Summary 2 This book opens the door to Visual Basic for Applications (VBA) in AutoCAD--including the robust new functions in AutoCAD 2000. You get an in-depth tour of all the basics, plus the more advanced areas such as using the Windows APIs, working with multiple Harness the power of VBA to automate and customize AutoCAD. This complete guide explains the vital concepts of Visual Basic for Applications (VBA) specific to AutoCAD programming and provides examples. The companion CD-ROM is packed with sample applications, macros, and utilities.  

目录


AutoCAD VBA Programming
Dedication
Acknowledgments
Preface
Table of Contents
Introduction
Chapter One— The AutoCAD VBA Environment
AutoCAD Programming Solutions
How AutoLISP Differs from VBA
Visual BASIC versus Visual BASIC for Applications
Essential VBA Vocabulary and Concepts
Getting Comfortable with the IDE
Starting the VBA IDE
What\\u0027s in the IDE?
Developing Applications with VBA inside AutoCAD
Chapter Two— VBA Application Jump-Start
Description of the Application
Start Your IDE
Design the Form
First Lines of Program Code
Form Properties
Add a List Box Control
Checklist
Programming the Starting Sequence
Global Variable Declarations
Counting Blocks Macro
Test Run the Main Macro
List Box Reactor Function
Test the Program
Final Test
Chapter Three— Understanding the AutoCAD Object-Oriented Database
Object-Oriented Programming Introduction
What\\u0027s an Object?
The Management Features of Objects
Object Concept Example
Computer Science Description of Objects
How Objects Are Stored in a Computer
About Creating New Objects
The AutoCAD Object Tree
The Document Object
Collection Objects
The Block Collection Object
Entity Objects
Learning about Objects in VBA
Chapter Four— The AutoCAD Object Model
Methods, Properties, and Events
Exploration of the AutoCAD Object Tree
Getting to the Application Object
The Application Object
Accessing the Document Object in VB
The Documents Collection
Document Object Methods
Document Object Properties
Document Object Events
Event Programming Example
Utility Object Functions
Collections of Objects
Entity Objects
Curved Entity Objects
Text Entity Objects
Preferences
Example Sequence
Chapter Five— Working with Entity Collection Objects
The Collection Object
Selection Sets Collection
Building a Collection of Entity Objects
Accessing Selection Set Members
More Selection Set Methods and Properties
Selection Set Collection Iterations
ModelSpace and PaperSpace Collections
Even More Selection Set Methods
Filtering the Selection Set
Refining the Filters—Numeric Tests
String Tests in Filters
Combining Multiple Tests
Selection Set Maintenance Issues
Working with Collections
Chapter Six— Drawing Tables
AutoCAD Drawing Tables
Tables Are Collections
The Dictionary Collection
The DimStyles Collection
The Groups Collection
Groups versus Dictionaries
The Layer Collection
The Linetypes Collection
The Registered Apps Collection
The Text Styles Collection
The UCS Collection
The Views Collection
The View Ports Collection
View Port Object
The Paper Space View Port Object
The Blocks Collection
Creating a New Block Definition
Reading a Block Definition
Working with Attribute Objects in a Block
Chapter Seven— Working with Other Applications
Object Models
Interface to Microsoft Excel
Excel Application 1 – Simple Database
Link to Excel
Variable Declarations
Excel Linkage Function
Closing the Workbook
Searching the Worksheet
Another Example Interface to Microsoft Excel
Using Handles
Object ID versus Handle
Linking with Other Applications
Storing Data in AutoCAD
Dictionary Object
Xrecord Objects
Accessing a Dictionary
Xrecord Contents
Reading Xrecords
Group Codes in Xrecords
Extended Data
Simple Xdata Example
Chapter Eight— Managing Multiple Projects
Putting Complete Applications Together
Loading Projects to Run
Embedded Projects
Projects on Disk
Re-Using Code
Running a Macro from Another Project
Sharing Data between Projects
Late and Early Binding in VBA
Multiple Projects in Release 14
Chapter Nine— API Calls from VBA
What\\u0027s an API?
The API Viewer
INI File Calls
How the PrivateProfileString APIs Work
API Declaration Breakdown
WritePrivateProfileString API Call
Registry Calls
The Registry Editor
The VBA Registry Functions
System Calls
Computer Name
User\\u0027s Login Name
System and Local Time
The Windows Temporary Directory
System Environmental Variable
Free Disk Space
Conclusion
Chapter Ten— VBA Toolbox Routines
Definition of Terms
Toolbox Overview
Acquiring Data Items from a Data String
Add Back Slashes Result to a Path String
Add Trailing Back Slash to a String Path
Convert an Object\\u0027s Entity Type to English
Count the Number of Occurences of a Delimiter in a String
Create a Directory Path
Determine the Tense of a Word
Display a Fatal Error Message
Find a File
Find a Line in a List Box Control
Find an Application Window
Format a Point in a String
Get the Current View\\u0027s Corner Points
Get the Extension from a String
Get the Left Substring from a String
Get the Path from a String
Get the Right Substring from a String
Pad a String with Spaces
Remove a String\\u0027s Null Terminator
Replace All Requested Characters in a String with Another Character
Retrieve the System\\u0027s Windows Directory
Show a Progress Spinner
Strip an Extension from a String
Strip the Path from a String
Verify a Control Exists on a Form
Verify a File\\u0027s Existence
Verify a Listbox Item Exists
Chapter Eleven— VB versus VBA
Quick Comparison of VB and VBA
Which Language for Which Situation?
Differences at the System Level
Porting Issues—from VB to VBA
Porting Issues—from VBA to VB
Attaching Your VB Application to the AutoCAD Object Model
VB and VBA Help
VB Help versus VBA Help
Accessing VBA and VB Help
On-Line Help
Context-Sensitive Help
Accessing AutoCAD Online Help
Building a Help File
The VBA Help Project
On-Line Help
Context-Sensitive Help
VB and VBA Help Conclusion
Chapter Twelve— Gotcha\\u0027s and Tips
Divergent Data Type Comparison
Using Control Keys to Maneuver in VBA
Class Modules in VBA
The Special Character for Date and Format
Named and Optional Arguments
Passing in the Declared Order
Passing by Name
Optional Arguments
Using an Array of Doubles versus a Variant as an Array
Passing an Array to an Object\\u0027s Methods
Collections and Procedures
Short Circuit Evaluation
Accessing Objects on the Same Level as Your Current Object
Listbox Columns
Multiple Columns
Column Size
Column Visibility
Listbox Column Specification
Loading Listbox Columns
AddItem Method
List and Column Properties
Column Headers
Multiselect in a Listbox
Variable Name Shortcuts
Command Line Workaround
The Problem
The Solution
Passing Forms and Controls as Parameters
Multipage Form Controls
Conclusion
Chapter Thirteen— Programming Style
Commenting Your Code
Keeping Code Concise and Simple
Proper Use of Subroutines and Functions
Scope, Precedence, and Life of Variables
Error Trapping
Do You Need to Change Your Programming Style for VBA?
Event-Driven versus Procedural-Driven Language
The Hungarian Naming Convention
Variables
Constants
User-Ddefined TTypes and CClasses
Collections
Form Controls
Procedures
Modules
Conclusion
Chapter Fourteen— Class Modules and Objects
Not All Objects Are Equal
The VBA Class Module
Objects Example 1— Extended Data Manipulations
Making a Class Module
Properties
Xdatatype, Xdatavalue, AryXdata
AppNames
ItemsCount
EntityType
Methods
AppExists
GetXdata
List
SetXdata
Split
StoreAppNames
The Extended Data Example Project
Extended Data Object Conclusion
Objects Example 2— Hole Chart
An Object in an Object
The Inner Object
The Hole Charting Example Project
Hole Chart Application Conclusion
Creating Your Own Object
Index
A
B
C
D
E
F
G
H
I
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z

已确认勘误

次印刷

页码 勘误内容 提交人 修订印次

    • 名称
    • 类型
    • 大小

    光盘服务联系方式: 020-38250260    客服QQ:4006604884

    意见反馈

    14:15

    关闭

    云图客服:

    尊敬的用户,您好!您有任何提议或者建议都可以在此提出来,我们会谦虚地接受任何意见。

    或者您是想咨询:

    用户发送的提问,这种方式就需要有位在线客服来回答用户的问题,这种 就属于对话式的,问题是这种提问是否需要用户登录才能提问

    Video Player
    ×
    Audio Player
    ×
    pdf Player
    ×
    Current View

    看过该图书的还喜欢

    some pictures

    解忧杂货店

    东野圭吾 (作者), 李盈春 (译者)

    loading icon