Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84244members
353343posts

Citect Cicode Function DspAnGetPos

Industry Automation and Control Forum

This forum is addressing industrial automation design & engineering, operations, asset performance, cyber security and digital transformation for Plants & Machines.

bprobertson
Ensign
Ensign
0 Likes
2
1456

Citect Cicode Function DspAnGetPos

Hi,

 

(Citect Version: v8.10.0.2086)

Why does this function return the position of the bottom left corner of the animation object relative to the top left corner of the window?

There is nothing in the manual stating that this is how the function works.

Shouldn't this function return the top left corner of the animation object?

 

2 Replies 2
Richard
Lieutenant Lieutenant
Lieutenant
0 Likes
0
1403

Re: Citect Cicode Function DspAnGetPos

The animation point is just a point so it has no top or bottom.

 

If an object or genie is being displayed at that point then obviously it does have a top and bottom but this can be offset anywhere from the animation point itself. For example, when you create a genie the animation point for it can be positioned top-left, bottom left or 143 pixels away.

 

You would have to look at the object itself to see where the animation point is positioned.

 

 

 

RobertSanders
Lieutenant Lieutenant
Lieutenant
0 Likes
0
1400

Re: Citect Cicode Function DspAnGetPos

Additional to Richard's comments, the DspAnGetPos() function returns the X and Y position of the animation point in question, relative to the top-left corner of the window (remember multiple screens can be present).

 

Every object on a Citect page has an Animation Point and some objects can have many depending upon whether multiple objects have been grouped into a single object etc..  This function is one of the few functions within Citect that returns both X and Y positions at the same time.

 

Example:

 

FUNCTION AnXYPos(INT hAn)
INT iXPos;
INT iYpos;

DspAnGetPos(hAn, iXpos, iYpos);

 

When the function is run iXpos & iYpos will contain the X, Y coordinates to the AN passed 

 

Regards

 

Rob