General XMetaL Discussion
leo71 April 21, 2009 at 2:28 pm
XM5.5 API Something changed? CreateObjectApril 21, 2009 at 2:28 pmParticipants 5Replies 6Last Activity 13 years, 2 months ago
I used to have the following prehistoric VB6 function to initiate the XMetal application thing:
Public Sub InitXmetal()
On Error GoTo unableToLoad
Set mvarObjXmetalApp = GetObject(, “XMetaL.Application”)
mvarYnObjXmetalApp = True
'mvarObjXmetalApp.PreventExit App.Title, “Cannot close XMetal; BTB is using it. Close BTB first.”
Set mvarObjXmetalApp = CreateObject(“XMetaL.Application”) ' here it goes wrong
mvarYnObjXmetalApp = False
When it falls back to the unableToLoad section, it fails at the CreateObject(“XMetaL.Application”) section. It appears to me that something has changed in the XMetal 5.5 API. In all previous versions in XMetal it works fine…Derek Read April 23, 2009 at 11:20 pm
Reply to: XM5.5 API Something changed? CreateObjectApril 23, 2009 at 11:20 pm
Either your script is missing some bits, or has a few typos in it (whatever the case I don't quite understand how it should work, so maybe it's just me).
I have no problem launching XMetaL Author Enterprise 5.5 using VB / VBScript:
[code]Set someVar = CreateObject(“XMetaL.Application”)[/code]
someVar = CreateObject(“XMetaL.Application”)[/code]
…and with JScript using this:
[code]var someVar = new ActiveXObject(“XMetaL.Application”);[/code]
The only thing I can think of is that for some reason XMetaL Author might not have been registered properly on your machine during installation (which is necessary to work with it using COM). You might try performing a “Repair” from the Add or Remove Programs tool in the Windows Control Panel, reinstalling, or running the following at a command prompt:
xmetal55.exe /regservermarkusmetzler May 19, 2009 at 7:40 pm
Reply to: XM5.5 API Something changed? CreateObjectMay 19, 2009 at 7:40 pm
xmetal55.exe /regserver fixes the problem on our machines.
I think the installers changed with XM 5.5 (Essential, Enterprise). They do not register the application anymore.Derek Read May 19, 2009 at 8:07 pm
Reply to: XM5.5 API Something changed? CreateObjectMay 19, 2009 at 8:07 pm
Registration at the command line (via xmetal55.exe /regserver) is something that will currently need to be handled separately from our installation process for people that need this feature.
For people not familiar with this feature, it means controlling XMetaL Author via some other process where a script that is external to an XMetaL macro (MCR) file needs to communicate with XMetaL Author. JScript provides “ActiveXObject()” and VBScript provides “CreateObject()” for this and you might also do something similar from a VB, C# or other type of compiled application.
We are looking into how to best resolve this issue in the future with regards to Vista security (UAC) and limited users. However, I have yet to find any information on this specific subject (including Windows 7 which we will likely support at some point after the official release).leo71 May 20, 2009 at 6:37 am
Reply to: XM5.5 API Something changed? CreateObjectMay 20, 2009 at 6:37 am
On my own computer (winxp) I didn't have any problems yet.
But my colleague did try 2 times to install XMetal 5.5 and our own custom toolset and get it working.
(Without knowing your patch).
This week she tried for the third time because I said I maybe had a solution, but surprise surprise it did work already. Maybe xmetal55.exe got registered succesfully by itself already.
But thanks anyway, I hope that I understand the problem a little bit better.XMetaLOldTimer May 23, 2009 at 12:39 am
Reply to: XM5.5 API Something changed? CreateObjectMay 23, 2009 at 12:39 am
Unfortunately, the XMetaL Author 5.5 installer has a bug specifically related to the COM registration of our XMetaL automation server objects (i.e. XMetaL.Application, XMetaL.Global, etc).
If you installed XMetaL Author anywhere other than “C:Program FilesXMetaL 5.5Author”, you would encounter this COM registration problem. The 5.5 SP1 installer corrects this problem.
Manually running “xmetal55.exe /RegServer” from a command-prompt window also corrects this problem if you don't want to apply the service pack.
Addammarkusmetzler September 6, 2010 at 2:08 pm
Reply to: XM5.5 API Something changed? CreateObjectSeptember 6, 2010 at 2:08 pm
I have installed XMetaL Author Essential 6.0 (Fileversion: 220.127.116.110). I think the issue is active again.
After using “xmetal60.exe /regserver” everything's fine.
- You must be logged in to reply to this topic.