FastFieldSolvers Forum
FastFieldSolvers Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 FastFieldSolvers
 FasterCap and FastCap2
 Issues with automation

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Antispam question: What do MOONwalk and MOONdance have in common?
Answer:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON

 
   

T O P I C    R E V I E W
PawelP Posted - May 05 2020 : 14:50:07
I tried to run a series of capacitance simulations in fastercap, for different geometries that I generated, using automation feature. I used the vb scripts and followed the examples and manuals. However I found two issues:

1. I'm unable to run the automation feature from command line on windows 10. The problem pertains not only to the geometries that I made, but also the original example with spheres from faster cap directory. Whenever I try to run it I'm getting the same error:

C/../fastercap_drive.vbs(27, 3) (null): Library not registered.

Which, I assume, refers to the line where actual simulation is called: couldRun = FasterCap.Run("""" + path + "sphere"+CStr(i)+".txt""")

I don't have this issue when I run automation on windows 7. Is automation supposed to work on windows 10?

2. It's more of a comment I guess. I generated my own lst files, which call a couple of txt files. When I run the simulation through the user interface than they work fine. When I tried automation (on windows 7- as I already figured out that it doesn't work on windows 10), initially I used different commands like that couldRun = FasterCap2.Run("""-l" + path + "filename.lst"""). I kept on receiving errors: Microsoft VBScript runtime error: Path not found. I tried different positions of '-l' identifier as I read in one of the topics. However I was able to run it successfully only after skipping '-l' in my run command for lst file.

Thanks for any comments in advance

7   L A T E S T    R E P L I E S    (Newest First)
Enrico Posted - Jul 01 2020 : 15:57:35
Hi Pawel,

we have been able to replicate the issue and we are investigating it.
I will update you when we have news.
Thanks for the patience. One question though, looking ahead; do you believe Automation is a real advantage for you, or you would be happy with a different system, e.g. text output and text logs, or sockets, or other?

The question is because we believe Automation is quite powerful, but it is limited to Win environment. Going ahead it might be more efficient to uniform the way other sofware can interact with the solver, regardless (as much as possible) of the OS platform.

Best Regards,
Enrico
PawelP Posted - May 18 2020 : 13:45:16
Dear Enrico,
Thank you for that!

I checked that and the only difference is data type: 'REG_SZ' instead of 'string' in all cases, but if I understand it properly, it's also a string format. I also wasn't sure how to check flag property, when I find relevant paths I only see three data types: Name (is always marked as default), Type (REG_SZ) and Data (matches entries that you posted)

Best wishes,
Pawel

Enrico Posted - May 18 2020 : 11:40:37
FastHenry and FastCap use the Microsoft Foundation Classes (MFC) that are also able to self-register the COM component in the registry when the application is run.

FasterCap is independent of MFC for portability (it also compiles with GCC) so it needs a proper installation in the registry.

I will try again to replicate your issue in a clean Win10 installation. However, if you are able to use the registry editor (regedit.exe), you could check if the proper keys have been correctly stored in the registry (don't worry, so far you don't need any modification of the registry, just browsing through it). You should find the following entries (where HKCR means "HKEY_CLASSES_ROOT"):


Root: HKCR; Subkey: "FasterCap.Document"; Flags: uninsdeletekey
Root: HKCR; Subkey: "FasterCap.Document"; ValueType: string; ValueData: "FasterCap Document"
Root: HKCR; Subkey: "FasterCap.Document\CLSID"; ValueType: string; ValueData: "{{4ACA654C-C56C-47d5-86F4-7B721F06E056}"
Root: HKCR; Subkey: "CLSID\{{4ACA654C-C56C-47d5-86F4-7B721F06E056}"; Flags: uninsdeletekey
Root: HKCR; Subkey: "CLSID\{{4ACA654C-C56C-47d5-86F4-7B721F06E056}"; ValueType: string; ValueData: "FasterCap Document"
Root: HKCR; Subkey: "CLSID\{{4ACA654C-C56C-47d5-86F4-7B721F06E056}\LocalServer32"; ValueType: string; ValueData: "{app}\FasterCap\FasterCap.exe"
Root: HKCR; Subkey: "CLSID\{{4ACA654C-C56C-47d5-86F4-7B721F06E056}\ProgId"; ValueType: string; ValueData: "FasterCap.Document"


Best Regards,
Enrico
PawelP Posted - May 12 2020 : 23:01:18
Dear Enrico,

That's actually really good suggestion. I ran both FastCap2 and FastHenry2 using both excel and vb scripts and all runs were successful. So it seems that issue is related only to FasterCap. Do you have any idea what might cause this difference?

Best,
Pawel
Enrico Posted - May 12 2020 : 14:42:23
Could you test if you can use Automation with FastCap and FastHenry? You can run the same samples in the respective directories.

Best,
Enrico
PawelP Posted - May 12 2020 : 13:29:08
Dear Enrico,

Thank you for the suggestions. I have re-installed FastFieldSolvers, however I'm still running into the same issue.

I also tried to run the excel automation example file. When I run it - after turning on macros - I get the following message in visual basic pop-up window:

Run-time error '-2147319779 (80028014)':

Automation error
Library not registered.

When I click debug, it points at line where it says: FasterCap.ShowWindow

I'm not sure what might be the issue


Cheers,
Pawel
Enrico Posted - May 06 2020 : 16:22:41
Dear Pawel,

Automation is intended to work also under Windows10. I re-tested it to be sure but found no issue.

The error 'library not registered' seems to point to an incorrect registration of the COM object into the Windows Registry.
Can you run the automation example via Excel (or via LibreOffice Calc if you don't have Excel; note that in this case you need a small modification in the VB script as per the comments in the script, reported here below for your convenience)

' uncomment the following two lines in LibreOffice Calc, and comment the next one
  'capRow = capacitance(0)
  'Cells(i + 5, 3).Value = capRow(0)
  ' comment this line in LibreOffice Calc
  Cells(i + 5, 3).Value = capacitance(0, 0)


If also this one does not work, I suggest to uninstall the FastFieldSolvers bundle and re-install it.

About your point 2, FasterCap does NOT use the -l switch. This is a FastCap only option.

Best Regards,
Enrico



FastFieldSolvers Forum © 2020 FastFieldSolvers S.R.L. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.06