Hi all,
I'm trying to get Geometry data, and I need RowType property for each of rows in Geometry sections.
But, for some reason, RowType function always returns -1, I don't get it why...
Can somebody help?
'Get the shape from the active page.
Set vsoShape = ActivePage.Shapes(1)
'Get the count of Geometry sections in the shape.
'(If the shape is a group, this will be 0.)
intSections = vsoShape.GeometryCount
'Iterate through all Geometry sections for the shape.
'Because we are adding the current Geometry section index to
'the constant visSectionFirstComponent, we must start with 0.
For intCurrentGeometrySectionIndex = 0 To intSections - 1
'Set a variable to use when accessing the current
'Geometry section.
intCurrentGeometrySection = visSectionFirstComponent + intCurrentGeometrySectionIndex
'Get the count of rows in the current Geometry section.
intRows = vsoShape.RowCount(intCurrentGeometrySection)
'Loop through the rows. The count is zero-based.
For intCurrentRow = 0 To (intRows - 1)
Debug.Print vsoShape.RowType(intCurrentGeometrySection, intRows) 'always -1
'Get the count of cells in the current row.
intCells = vsoShape.RowsCellCount(intCurrentGeometrySection, intCurrentRow)
'Loop through the cells. Again, this is zero-based.
For intCurrentCell = 0 To (intCells - 1)
Debug.Print vsoShape.CellsSRC(intCurrentGeometrySection, intCurrentRow, intCurrentCell).LocalName & ": " & vsoShape.CellsSRC(intCurrentGeometrySection, intCurrentRow, intCurrentCell).Result("mm")
Next intCurrentCell
Next intCurrentRow
Next intCurrentGeometrySectionIndex
"Debug.Print vsoShape.RowType(intCurrentGeometrySection, intRows) 'always -1"
possibly because intRows as an index will point past the last row (index is 0 based)?
may be rather than intRows you might want to use intCurrentRow?
al
Quote from: aledlund on August 09, 2012, 10:15:58 PM
"Debug.Print vsoShape.RowType(intCurrentGeometrySection, intRows) 'always -1"
possibly because intRows as an index will point past the last row (index is 0 based)?
may be rather than intRows you might want to use intCurrentRow?
al
Ooooh man, I can't get use to this VBA thing :D (blush)
Thank you very much and I apologize for this stupid question, moderators you can delete it! :)
Marko
My wife knows how things are going when I come up and say "I learned a lot today"
da nada,
al
Browser ID: smf
(is_webkit)
Templates: 1:
Printpage (default).
Sub templates: 4:
init,
print_above,
main,
print_below.
Language files: 1:
index+Modifications.english (default).
Style sheets: 0:
.
Hooks called: 50 (
showintegrate_autoload, cache_get_data, integrate_pre_load, integrate_load_session, integrate_verify_user, cache_get_data, integrate_user_info, integrate_load_board, cache_get_data, integrate_board_info, cache_get_data, integrate_allowed_to_general, integrate_pre_load_theme, cache_get_data, integrate_allowed_to_general, integrate_simple_actions, integrate_allowed_to_general, integrate_load_theme, integrate_pre_log_stats, cache_get_data, integrate_actions, integrate_pre_parsebbc, integrate_bbc_codes, integrate_bbc_print, integrate_post_parsebbc, integrate_pre_parsebbc, integrate_bbc_print, integrate_post_parsebbc, integrate_pre_parsebbc, integrate_bbc_print, integrate_post_parsebbc, integrate_pre_parsebbc, integrate_bbc_print, integrate_post_parsebbc, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_menu_buttons, integrate_current_action, integrate_theme_context, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general)
Files included: 25 - 925KB. (
show/home/iw0lkfe3x6cq/public_html/vgforum/index.php, /home/iw0lkfe3x6cq/public_html/vgforum/Settings.php, /home/iw0lkfe3x6cq/public_html/vgforum/cache/db_last_error.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/QueryString.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Subs.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Subs-Auth.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Errors.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Load.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Security.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Subs-Compat.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Subs-Db-mysql.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Cache/CacheApi.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Cache/CacheApiInterface.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Cache/APIs/FileBased.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Subs-Charset.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Unicode/Metadata.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Unicode/QuickCheck.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Session.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Logging.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Class-BrowserDetect.php, (Current Theme)/languages/index.english.php, (Current Theme)/languages/Modifications.english.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Printpage.php, (Current Theme)/Printpage.template.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Unicode/CaseUpper.php)
Memory used: 776KB.
Tokens:
post-login.
Cache hits: 7: 0.00139s for 22,302 bytes (
showget modSettings: 0.00049s - 19983 bytes, get known_languages: 0.00016s - 1277 bytes, get board_parents-0: 0.00012s - 2 bytes, get permissions:-1: 0.00007s - 50 bytes, get theme_settings-1: 0.00027s - 980 bytes, get log_online-update: 0.00023s - 10 bytes, get menu_buttons--1-english: 0.00005s - 0 bytes)
Cache misses: 1: (
showget menu_buttons--1-english)
Queries used: 9.
[Show Queries]