Message 1 of 4
PropertySets() with empty string crash

Not applicable
08-11-2005
11:32 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This vba code crash Inventor (after clicking on debug):
dim mat as string
mat = ""
Call ThisApplication.ActiveDocument.PropertySets(4).Add(mat, "MAT")
Work around:
if mat = "" then
Call ThisApplication.ActiveDocument.PropertySets(4).Add("", "MAT")
else
Call ThisApplication.ActiveDocument.PropertySets(4).Add(mat, "MAT")
end if
Same problem for:
dim mat as string
mat = ""
ThisApplication.ActiveDocument.PropertySets(4).Item("MAT").Value = mat
ThisApplication.ActiveDocument.PropertySets(4).Item("MAT").Value = ""
Works without problem
dim mat as string
mat = ""
Call ThisApplication.ActiveDocument.PropertySets(4).Add(mat, "MAT")
Work around:
if mat = "" then
Call ThisApplication.ActiveDocument.PropertySets(4).Add("", "MAT")
else
Call ThisApplication.ActiveDocument.PropertySets(4).Add(mat, "MAT")
end if
Same problem for:
dim mat as string
mat = ""
ThisApplication.ActiveDocument.PropertySets(4).Item("MAT").Value = mat
ThisApplication.ActiveDocument.PropertySets(4).Item("MAT").Value = ""
Works without problem