Autodesk's latest. NET tutorial (4) (vb.net)

Source: Internet
Author: User

Chapter 2 database basics 2: add custom data
 
In this chapter, we will create a new dictionary object to represent the Department of The 'acme company '(which, of course, is a fictitious company) where our employees work. This "department" dictionary object will contain a record indicating the department manager. We will also add code to the employee creation process, which will add an index to the employee's department.
We want to explain how to create custom data in the DWG file, including "custom data for each image" and "custom data for each entity. The Custom Data of "each graph" refers to the data that is added only once in the whole graph. It indicates a single type or feature that an object can reference. Custom Data for each object refers to the data that is added to a specific object or an object in the database.
In the following example, we add the custom data of "each graph" to the named object dictionary (NOD ). NOD exists in each DWG file. The custom data of each object is added to an extended Dictionary (optional), which indicates every employee. Each object derived from DBObject has an extended dictionary that stores custom data. In our example, we will include such custom data such as name, salary, and department.
Therefore, this chapter focuses on dictionary objects and extended records, which are containers used to represent custom data.
First, let's create entries that represent the company. In the previous steps of this chapter, we will create the department hierarchy as follows:
NOD-name object dictionary
ACME_DIVISION-custom company dictionary
Sales-department dictionary
Department Manager-department entry
 
Open the Lab4 project in the Lab4 folder or add the Lab3 code.
<! -- [If! SupportLists] --> 1) <! -- [Endif] --> the first thing we need to do is to define a new function, which is used to create a company dictionary object in the named object dictionary (NOD. Name this function

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.