Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


COM Reference in VBScript

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,62555
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> COM Reference in VBScript
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 COM Reference in VBScript - 7/21/2008 6:58:27 AM   
  misho

 

Posts: 3
Score: 0
Joined: 7/21/2008
Status: offline
Hi,

New to VB Script (i.e. started around noon today).

I'm trying to control a program called SolidEdge, and have successfully done it with VB.net, but
Now, I'm supposed to do it with VBScript because this code is eventually going to be generated
by another application.

Anyway, in Visual Studio, you can add a reference to a COM component, and then it makes a
<COMReference Include="SolidEdgeConstants"> entry (or something like that) in the
.vbproj file (an XML document), and then I can access things in that library.

Is there anything like that in VBScript?

Thanks.

- Misho
 
 
Post #: 1
 
 RE: COM Reference in VBScript - 7/21/2008 8:25:09 AM   
  Rischip


Posts: 502
Score: 2
Joined: 3/26/2007
Status: offline
Probably something like
Set myVar = CreateObject("SolidEdgeConstants")
or
Set myVar = CreateObject("SolidEdgeConstants.Application")

it depends on how the com component is registered. Look in the Registry or the docs for the product.

or could be

Set myvar = GetObject("SolidEdge.Application")
Set myVar = GetObject("SolidEdgeFramework.Application")

Those two are based on some vb code I found

_____________________________

Rischip
Author of - The Grim Linker

(in reply to misho)
 
 
Post #: 2
 
 RE: COM Reference in VBScript - 7/21/2008 8:31:50 AM   
  Rischip


Posts: 502
Score: 2
Joined: 3/26/2007
Status: offline
Set objApp = CreateObject("SolidEdge.Application")

This one came out of this doc http://www.ugs.pl/publikacje/V15_ProgrammersGuide_MU28000.pdf

_____________________________

Rischip
Author of - The Grim Linker

(in reply to Rischip)
 
 
Post #: 3
 
 RE: COM Reference in VBScript - 7/23/2008 8:21:13 AM   
  misho

 

Posts: 3
Score: 0
Joined: 7/21/2008
Status: offline
<reference guid="C467A6F5-27ED-11D2-BE30-080036B4D502" /> <-- This is what I was looking for. Thanks anyway.

By the way, is there some way of doing this with vbscript, or is the only way through a WSF file?

(in reply to Rischip)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> COM Reference in VBScript Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts