Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to access clipboard objects in the secondary development of TE

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

Xiaobian to share with you how to access the clipboard object TE secondary development, I believe most people do not know how to share this article for your reference, I hope you have a lot of harvest after reading this article, let's go to understand it together!

During TE operation and development, when selecting an object in editing state, click the right mouse button to pop up an object operation menu, including cutting, copying, pasting and other functions. You can select an object on the map and carry out general copying and pasting object operations.

In the development, te also provides the corresponding interface, you can through the program development, access the spatial objects in the clipboard, manipulate the objects therein.

The following is an example of js code in te, which briefly explains how to find the contents of the clipboard:

function searchGeometriesClipboard(callbackFunc) {

//does not allow information tree refresh, which has an effect on sketching large quantities of individual objects

SGWorld.ProjectTree.EnableRedraw(0);

var Object;

//Access objects in the clipboard, cycling through them by number

for (i = 0; i < SGWorld.Application.Clipboard.Count; i++) {

try {

//Get a single object

Object = SGWorld.Application.Clipboard.Item(i);

//height type of object

var altitudeType = Object.Position.AltitudeType;

var ret;

if (Object.ObjectType == 1 || Object.ObjectType == 2)

//callbackFunc function, js can pass the function as a parameter to perform some operations

ret = callbackFunc(Object.Geometry, Object.ObjectType, altitudeType, Object.Position);

else

ret = callbackFunc(Object.Position, Object.ObjectType, altitudeType, Object.Position);

if (! ret) {

SGWorld.ProjectTree.EnableRedraw(1);

return;

}

}

catch (e) { }

}

//Allow information tree refresh

SGWorld.ProjectTree.EnableRedraw(1);

}

The above is "TE secondary development in how to access the clipboard object" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report