VI-Toolkit and Forms 2009

Archived support forum for customers who once purchased a PrimalForms product license. This forum is locked.
This topic is 14 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
rmutchler
Posts: 19
Last visit: Sun Aug 24, 2014 8:08 am

VI-Toolkit and Forms 2009

Post by rmutchler »

I developed some scripts in Forms CE and now I'm trying to port them over to Forms 2009. For some reason, the code works in CE, but not in 2009. Am I missing something in the conversion? It was a copy/paste of the code into the new version.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

VI-Toolkit and Forms 2009

Post by davidc »

What error are you getting? Note: That PrimalForms does not load profiles, so you will have to add your snapin in the script.

David
David
SAPIEN Technologies, Inc.
User avatar
rmutchler
Posts: 19
Last visit: Sun Aug 24, 2014 8:08 am

VI-Toolkit and Forms 2009

Post by rmutchler »

In the OnApplicationLoad I do load my snapin.



This is the same 4 lines of code I run on both versions on the button onClick action:

Code: Select all

$vc_server=Read-Host-Prompt "VC/ESX Server Name"
$statusBar1.Text = "Connecting to " + $vc_server
Connect-VIServer $vc_server -Credential (Get-Credential)
if ($vc_server.isConnected -eq $true) {

Essentially CE will pass the isConnected test, but 2009 is not passing the test.

I'm using the Package feature on Windows 7 Enterprise with the latest version of Forms.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

VI-Toolkit and Forms 2009

Post by davidc »

A few more questions:

1. Does the script function correctly when you run it from PrimalForms 2009 instead of the Package?
2. Do the plugin commands show up on the PowerShell Panel?
3. Where are you running the CE version of the script?

Thank you,

David
David
SAPIEN Technologies, Inc.
User avatar
rmutchler
Posts: 19
Last visit: Sun Aug 24, 2014 8:08 am

VI-Toolkit and Forms 2009

Post by rmutchler »

1. No
2. Yes
3. The CE version was running on the same machine. I am not running CE and 2009 at the same time. I was developing CE on this machine before I purchased the full version.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

VI-Toolkit and Forms 2009

Post by davidc »

The CE edition of PrimalForms is not able to run scripts; it is only able to generate the form script. When you exported the script, did you run the script directly from PowerShell or from a Host like PrimalScript?

Thank you,

Daviddavidc2009-09-14 09:04:30
David
SAPIEN Technologies, Inc.
User avatar
rmutchler
Posts: 19
Last visit: Sun Aug 24, 2014 8:08 am

VI-Toolkit and Forms 2009

Post by rmutchler »

I ran the script directly from PowerShell. It was also working using the debugger in CE.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

VI-Toolkit and Forms 2009

Post by davidc »

I think there is a confusion as what edition is which. Can you post a screen shot of both versions you have installed?

Thank you,

David
David
SAPIEN Technologies, Inc.
User avatar
rmutchler
Posts: 19
Last visit: Sun Aug 24, 2014 8:08 am

VI-Toolkit and Forms 2009

Post by rmutchler »

uploads/31630/PF2009.jpg
uploads/31630/PFCE.jpg


Attached screenshots. rmutchler2009-09-14 11:02:13
User avatar
Alexander Riedel
Posts: 8488
Last visit: Mon Apr 15, 2024 3:28 pm
Answers: 20
Been upvoted: 37 times

VI-Toolkit and Forms 2009

Post by Alexander Riedel »

I see you are using Get-Credentials.
When you run the exported script in powershell directly you are prompted for the credentials in the shell, right?
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 14 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.