VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

getkword ques

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
250 Views, 3 Replies

getkword ques

from the help files:(for InitializeUserInput )

Keyword

Variant (array of strings); input-only; optional
The keywords that the following user-input method will recognize.



then in the example for same help entry they don't use a variant array of
strings, just a string

' Define the valid keywords
Dim keywordList As String
keywordList = "Keyword1 Keyword2"

' Call InitializeUserInput to setup the keywords
ThisDrawing.Utility.InitializeUserInput 128, keywordList


what's up with that? Am I misunderstanding (again:-))

I can only get it to work with a string, I can't get it to work with a
variant array of strings

Dim vchoice As Variant
Dim achoice(1) As String
achoice(0) = "Left"
achoice(1) = "Right"
vchoice = achoice
doc.Utility.InitializeUserInput 0, vchoice

error: Invalid argument keywordlist in initialize user input

is that a typo in the help or is "String1 String2" really a variant array of
strings????
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

I think What they are referring as needed for keyword is more a LIST of word separated by spaces in STRING type...

Helps?

Jovann from Cadcom
Message 3 of 4
Anonymous
in reply to: Anonymous

Yes, that is what works, it just doesn't match the wording of the help file.
(what else is new?)
:-) good ol' help

"jovann7235" wrote in message
news:f16c30d.0@WebX.maYIadrTaRb...
> I think What they are referring as needed for keyword is more a LIST of
word separated by spaces in STRING type...
> Helps?
>
> Jovann from Cadcom
>
>
Message 4 of 4
DavidTosh
in reply to: Anonymous

So here it is nearly 2015 and the wording of the help file remains the same. I clearly specifies "Variant (array of strings); "

 

The example uses a simple string with words separated by a space. How hard could it be to fix the help file?

 

---
Tosh
Tags (1)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost