Set Attribute value to 'no value'

Set Attribute value to 'no value'

Anonymous
Not applicable
382 Views
6 Replies
Message 1 of 7

Set Attribute value to 'no value'

Anonymous
Not applicable
Basically, I'm trying to remove the value of an attribute. AttArray(1).TextString = "" results in: Run-time error: Invalid Input Note: I don't want to delete the attribute, just set the value to nothing.
0 Likes
383 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable
Is your code actually using a literal empty string or is it something else like a variable or the text property of a text box?
0 Likes
Message 3 of 7

Anonymous
Not applicable
A bug in the ActiveX API causes this error. It is supposed to be applied to the TagString value, but is applied to the TextString value as well. Is this AutoCAD 2005? I've not checked in that release, but I'd be very dismayed if they didn't fix this one yet, as they've only known about it for about 5 years.... The best you can do is set it to a single space. -- http://www.caddzone.com AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005 http://www.acadxtabs.com "Phil Clark" wrote in message news:42273a00$1_2@newsprd01... > Basically, I'm trying to remove the value of an attribute. > > AttArray(1).TextString = "" > results in: > Run-time error: > Invalid Input > > Note: I don't want to delete the attribute, just set the value to nothing. > >
0 Likes
Message 4 of 7

Anonymous
Not applicable
Phil Clark wrote: > Basically, I'm trying to remove the value of an attribute. Can you use ToolPac > Attribute > Strip? Terry
0 Likes
Message 5 of 7

Anonymous
Not applicable
It's from a variable taken from textbox text prop. "fantum" wrote in message news:25400748.1109870191068.JavaMail.jive@jiveforum2.autodesk.com... > Is your code actually using a literal empty string or is it something else like a variable or the text property of a text box?
0 Likes
Message 6 of 7

Anonymous
Not applicable
ok, thanks Tony I noticed it in 2004, but tested 2005 and it's bugged there too "Tony Tanzillo" wrote in message news:4227470a$1_2@newsprd01... > A bug in the ActiveX API causes this error. > > It is supposed to be applied to the TagString value, > but is applied to the TextString value as well. > > Is this AutoCAD 2005? I've not checked in that > release, but I'd be very dismayed if they didn't > fix this one yet, as they've only known about it > for about 5 years.... > > The best you can do is set it to a single space. > > -- > http://www.caddzone.com > > AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005 > http://www.acadxtabs.com > > "Phil Clark" wrote in message news:42273a00$1_2@newsprd01... > > Basically, I'm trying to remove the value of an attribute. > > > > AttArray(1).TextString = "" > > results in: > > Run-time error: > > Invalid Input > > > > Note: I don't want to delete the attribute, just set the value to nothing. > > > > > >
0 Likes
Message 7 of 7

Anonymous
Not applicable
If the text box is empty then the returned value for its text property is not an empty string but a null string - a string whose address is zero. The TextString property of an attribute doesn't like those. Try concatenating the text property with an empty string when assigning it to the variable.
0 Likes