vbscript

vbscript

Anonymous
Not applicable
322 Views
5 Replies
Message 1 of 6

vbscript

Anonymous
Not applicable
Hi,
I am using AutoCad2002 and I'd like automating it through VBScript. When I call Utility.GetPoint function, it returns me an array, but I am not able to get the values. I get a mismatch type error.

But this work out on VBA or VB6.
Can anyone help me?
0 Likes
323 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
I'd suggest posting the relevant portions of the code. I'm not a VBA wizard, but "I am not able to get the values......mismatch type error" doesn't say much. "amartim" wrote in message news:22688469.1088701487588.JavaMail.jive@jiveforum2.autodesk.com... > Hi, > I am using AutoCad2002 and I'd like automating it through VBScript. When I call Utility.GetPoint function, it returns me an array, but I am not able to get the values. I get a mismatch type error. > > But this work out on VBA or VB6. > Can anyone help me?
0 Likes
Message 3 of 6

Anonymous
Not applicable
"amartim" wrote in message news:22688469.1088701487588.JavaMail.jive@jiveforum2.autodesk.com... > Hi, > I am using AutoCad2002 and I'd like automating it through VBScript. When I call Utility.GetPoint function, it returns me an array, but I am not able to get the values. I get a mismatch type error. > > But this work out on VBA or VB6. > Can anyone help me? VBScript uses untyped variables, everything is a variant. VBA and VB6 use typed variables. So, try explicityly converting your variables using CInt, CDbl, CLng, etc. Not sure off the top of my head if a point is an array of Longs or Doubles or what. Best, Gordon
0 Likes
Message 4 of 6

Anonymous
Not applicable
Hi,
when I used Join function (converts an array to a commas separated string) I got this error:
"variable uses an automation type not supported in vbscript" I went to Microsoft site and they said: "Only use variable types recognized by VBScript."

I guess there is no compatibility... If so, do you know another way to get the point selected by the user else then this array

Thanks

Follow my code

0 Likes
Message 5 of 6

Anonymous
Not applicable
"amartim" wrote in message news:4869952.1088711767825.JavaMail.jive@jiveforum2.autodesk.com... > Hi, > when I used Join function (converts an array to a commas separated string) I got this error: > "variable uses an automation type not supported in vbscript" I went to Microsoft site and they said: "Only use variable types recognized by VBScript." > > I guess there is no compatibility... If so, do you know another way to get the point selected by the user else then this array Not sure there. However, I am wondering why you would use VBScript external to Acad when Acad is interacting with a user? I usually only use WSH/VBScript to automate AutoCAD doing things on its own, not user driven. Is there a reason you couldn't write your app in VBA? Best, Gordon
0 Likes
Message 6 of 6

Anonymous
Not applicable
Hi,
We need to automate part of the process. The drawing is made externally from another company, but the list of materials should by inserted on the drawing remotly, through the internet. I belive all the job needed to create this list externally is possible, but I need the drawer to select where the list will be created on the drawing. So I need the GetPoint function. If you have another strategy...

regards
Alessandro
0 Likes