Search found 1026 matches

by Grovkillen
Thu Sep 19, 2013 4:39 pm
Forum: Technical / Scripting
Topic: VBScript Array of Double -> unable to get it
Replies: 12
Views: 254281

Okay, so here's the fix I found that is all right if you ask me. 1. Open Excel, create a module in the Visual Basic Editor In this Module create a Sub: Sub Auto_Open() GetInfoFromSW_Array = CreateObject("SldWorks.Application").ActiveDoc.Extension.CreateMassProperty.CenterOfMass Range("A1").Value = G...
by Grovkillen
Thu Sep 19, 2013 1:20 pm
Forum: The Water Cooler
Topic: The Unofficial Macro Scheduler Puzzler of the Week
Replies: 15
Views: 21991

JRL wrote:Congratulations, that is a correct answer and is the exact answer I was looking for....
Thanks for the points!!! :) And thanks for the fun puzzle.
by Grovkillen
Wed Sep 18, 2013 12:53 pm
Forum: Technical / Scripting
Topic: VBScript Array of Double -> unable to get it
Replies: 12
Views: 254281

Thanks for your time Marcus, I think I finally understand what's causing the headache. The problem seems to be the VBScript way of handling variable types and SolidWorks way of handing the VBScript double formated arrays. I found this post on a Matlab forum (many years old, no solution to the proble...
by Grovkillen
Wed Sep 18, 2013 12:24 pm
Forum: Technical / Scripting
Topic: VBScript Array of Double -> unable to get it
Replies: 12
Views: 254281

Ooooh ... that's pretty fundamental. Sorry for not knowing that. So in other words, it's not possible for me to retrieve the values from the SW API using VBScript? Everytime I try to assign a variable a value from the array I get the error and that's because of the limitation of VBScript? I'm really...
by Grovkillen
Wed Sep 18, 2013 12:02 pm
Forum: The Water Cooler
Topic: The Unofficial Macro Scheduler Puzzler of the Week
Replies: 15
Views: 21991

Yeah, Marcus... I'm always showing off :D

Anyway here's the not so super hard way to do the same thing:

Code: Select all

Let>JRL={"1+1"}
MDL>JRL
by Grovkillen
Wed Sep 18, 2013 8:07 am
Forum: The Water Cooler
Topic: The Unofficial Macro Scheduler Puzzler of the Week
Replies: 15
Views: 21991

Sorry for not sticking with the rules (I'm 50+ posts) but I have waited almost a whole week! :) Anyway here's a super hard coded solution to assign a variable the text "1+1". I.e. it's not very dynamic.

Code: Select all

Let>JRL={copy("1+1",0,3)}
MDL>JRL
by Grovkillen
Wed Sep 18, 2013 7:49 am
Forum: Technical / Scripting
Topic: VBScript Array of Double -> unable to get it
Replies: 12
Views: 254281

I still need help with this issue. Solving it would take a huge headache away from me. Sorry for spamming but I suspect that my problem is not very well explained by me. Here's my latest try: Test in Excel Below code is run without any problem using the Visual Basic Editor in Excel. The code is used...
by Grovkillen
Tue Sep 17, 2013 11:11 am
Forum: Technical / Scripting
Topic: VBScript Array of Double -> unable to get it
Replies: 12
Views: 254281

Hello Marcus, I'm not sure we're on the same page here, I'll make a try to make it more clear: My first picture above display the code and the resulting MsgBox in Excel. The result is collected from SolidWorks using the API call. The value "1,6244...E-03" is the third (2) value in the Double() forma...
by Grovkillen
Tue Sep 17, 2013 8:26 am
Forum: Technical / Scripting
Topic: VBScript Array of Double -> unable to get it
Replies: 12
Views: 254281

If I break it up I still get the same error when trying to assign a array value to a string. I.e. my example: "MessageToDisplay = GetInfoFromSW_Array( x )" where x = 0 or 1 or 2 (because this is the size of the array that I get from the API call). If I do the exact same thing in Excel VBA I get what...
by Grovkillen
Tue Sep 17, 2013 7:01 am
Forum: Technical / Scripting
Topic: VBScript Array of Double -> unable to get it
Replies: 12
Views: 254281

Thank you for the reply Marcus! I still have problem passing the Double array values. I started messing around in the Excel Visual Basic editor and to my supprise the "same code" worked like a charm! Can someone please tell me I'm doing something really stupid in MS that messes upp my execution of t...
by Grovkillen
Mon Sep 16, 2013 6:27 am
Forum: Technical / Scripting
Topic: VBScript Array of Double -> unable to get it
Replies: 12
Views: 254281

VBScript Array of Double -> unable to get it

Hello, I have googled and tried to find the solution to my problem but I have yet to find it. The problem I have is that when I try to get the CenterOfMass from SolidWorks using the API I cannot snag the output. I'm really new to VB but have got this to work when just trying to obtain the "Mass" fro...
by Grovkillen
Wed Sep 11, 2013 1:23 pm
Forum: Enhancement Suggestions
Topic: [Done] HTML/CSS elements in Custom Dialogs
Replies: 20
Views: 26824

Thanks Rain for your help. I will read more about it... I'm kinda freaked out by the fact that I would need to involve more script languages = might be hard to over look when searching for errors. But I'll give it a shot. Thanks once again!
by Grovkillen
Wed Sep 11, 2013 12:17 pm
Forum: Enhancement Suggestions
Topic: [Done] HTML/CSS elements in Custom Dialogs
Replies: 20
Views: 26824

Hi there, I'm not sure how to make use of the .hta window. It cannot be dynamic as far as I can tell. It's not possible to throw stuff to it the same way as to Message> for example: Let>DOT_TO_DISPLAY= Let>NUMBER_OF_DOTS=0 Let>k=0 Repeat>k Let>k=k+1 Wait>1 Let>NUMBER_OF_DOTS=%NUMBER_OF_DOTS%+1 Let>D...
by Grovkillen
Tue Sep 10, 2013 6:42 pm
Forum: Enhancement Suggestions
Topic: [Done] HTML/CSS elements in Custom Dialogs
Replies: 20
Views: 26824

Thanks for showing this Rain. Will use it for now... it involves writing a ".hta"-file to a temp folder which is not what I'd like but it'll do for now. Thanks again Rain for helping me. :)
by Grovkillen
Tue Sep 10, 2013 11:48 am
Forum: Enhancement Suggestions
Topic: [Done] HTML/CSS elements in Custom Dialogs
Replies: 20
Views: 26824

I'm hammering away on this subject: If this is ever implemented it would be great if the Message> , MessageModal> , Ask> and Input> would be HTML enabled. Alot of time I use these to inform users about errors and or update information etc. etc. and today they are really gray... It would be awesome t...
cron
Sign up to our newsletter for free automation tips, tricks & discounts