Modify and read the shape attribute in Visio

Source: Internet
Author: User

 

In Visio, shape is a shape, and shape is an object. To perform operations on the Shape attribute, you must first locate each shape and identify different types of shapes, the general steps and related functions are as follows:

1. Locate page

Visio. Page page = (visio. Page) visioform. axdrawingcontrol. Document. Pages [1] is in the form of a single page. 1 indicates the first page, instead of starting from 0 to the array.

2. traverse the shapes used,All shapes on the page are shape and placed in the shapes of the page object.

For (INT I = 1; I <= page. shapes. Count; I ++)

{

Shape sp = shapes [I];

} Note that the subscript of shape starts from 1.

3. Find the cell and use the cell method in shape to store various properties. By finding these cells, you can read and set the attributes on the row.

(1) UseCellssrcexists(Section,
Row,Column,Fexistslocally) Or

Cellexistsu (Localeindependentcellname,
Fexistslocally
) To determine whether the cell to be used exists. The difference between them is that the former uses an index to locate the search, and the latter uses a name to locate the search;

(2) Use cellssrc (Section,Row,
Column
) OrCellsu(Localeindependentcellname) To return the corresponding cell object;

(3) Use the Cell Object'sSet_result and get_ ResultTo perform read/write operations.

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.