Remove objects from AOI manager
(Originally posted by Rik on 12/22/2006)
Is it possible to remove all AOIs called Object * from an AOI list.
eg
Object 1
Object 2
Polygon1
The option IpAoiManager(AOIDELETE, "Object "&*) is not recognized.
I would like to clear AOI starting with object without knowing how many objects there are to start with (so no loop).
0
Comments
-
(Originally posted by Chris Tully on 12/26/2006)
Rik,
Unfortunately, IpAoiManager is not written to handle wild card characters, so you will have to use a loop:Sub Clear_AOI_List() Dim numAOIs As Integer Dim sOut As String*255 Dim i As Integer ' Find out how many AOIs there are ret = IpAoiGet(AOIMGR_GET_NUM, 0, numAOIs) ' Iterate through the AOIs in reverse order For i = numAOIs - 1 To 0 Step -1 ret = IpAoiGetStr(AOIMGR_GET_NAME, i, sOut) 'If the AOI's name starts with Object, then delete it ' Notice that the if statement is written to be case insensitive If UCase(Left(sOut, 6)) = "OBJECT" Then ret = IpAoiManager(AOIDELETE, sOut) End If Next i End Sub
0
Categories
- All Categories
- 961 Image-Pro v9 and higher
- 9 Image-Pro FAQs
- 18 Image-Pro Download & Install
- 448 Image-Pro General Discussions
- 486 Image-Pro Automation (Macros, Apps, Reports)
- 20 AutoQuant Deconvolution
- 2 AutoQuant Download & Install
- 18 AutoQuant General Discussions
- 195 Image-Pro Plus v7 and lower
- 3 Image-Pro Plus Download & Install
- 106 Image-Pro Plus General Discussions
- 86 Image-Pro Plus Automation with Macros
- 19 Legacy Products
- 16 Image-Pro Premier 3D General Discussions
- 26 Image-Pro Insight General Discussions