Industry Automation and Control Forum
This forum is addressing industrial automation design & engineering, operations, asset performance, cyber security and digital transformation for Plants & Machines.
Posted: 2020-04-24 12:19 AM
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-04-24 12:19 AM
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?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-05-13 11:10 AM
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.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-05-13 12:08 PM
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
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.