PropertySets() with empty string crash

PropertySets() with empty string crash

Anonymous
Not applicable
230 Views
3 Replies
Message 1 of 4

PropertySets() with empty string crash

Anonymous
Not applicable
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
0 Likes
231 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Jan,

I haven't been able to reproduce the problem. Could you give more specific
steps that lead to the crash? Also, is this specific to some files or does
it happen always (new documents as well)?

Sanjay-

wrote in message news:4926977@discussion.autodesk.com...
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
0 Likes
Message 3 of 4

Anonymous
Not applicable
See error report send on 15 aug 2005 8:54
0 Likes
Message 4 of 4

Anonymous
Not applicable
Hotfix TS1052452 does fix it.
0 Likes