problem with ilogic code when ilogic is run form an exe program - autodesk

I have an ilogic code that copy some text into the clipboard in window. When I run the code form inventor. form a VBA form. it work find .. but if i do the same form a form create in visual studio and run the program I get an error on some of the code... one of them say i need to run it as single-threaded apartment
if I common out this line .. there are no error
Clipboard.SetText(oPreprice)
oPreprice is just a large string.
anyone know how I get the logic code to work form an program in visual studio(vb)
I need to add the string to the clipboard .. that I use to add the data faster to Excel files. it about 10 as fast as if I use the normale code to writte the data into the .xls file

Related

How to save the output of Eclipse in a different file in every run for sap abap

i have a run a program and i got some output on the console as
{"CUSTOMER_ID":"0000010001","CUSTOMER":"IDADMIN","ADDRESS":"Chennai"}
{"CUSTOMER_ID":"0000010004","CUSTOMER":"IDADMIN","ADDRESS":"Bangalore"}
now i need to save the output of Eclipse in a different file
when i checked in google for this i found few steps to achieve it.
Write a program as usual in eclipse.
While on the program screen, click on Run -> Run Configurations…
Navigate to “Common” tab
Check “File:” and “Append” box and enter the file path and apply
Run the test as usual, check the file at specified path…
the file is creating in the path but instead of the output in console some text has been saving in it like the process of transfering.

How can I use VBA code to convert a .html file to an existing .xlsm file?

I have software that generates a 2x 25,000 table of numbers in an .html format. My current process is opening the .html, saving as Excel workbook, etc.
The goal is to automate the process, import the data to Excel, and generate graphs and box charts. I have used macros to accomplish the latter but I am struggling with getting the .html data into the existing .xlsm.
I have found this code, from a helpful thread on Stack Overflow:
Sub Open_HTML_Save_XLSX()
Workbooks.Open Filename:="C:\Temp\Example.html"
ActiveWorkbook.SaveAs "C:\Temp\Example.xlsx", xlOpenXMLWorkbook
End Sub
However, I'm not sure how to use it. I've been using custom made keyboard shortcuts to access my macros such as Ctrl+Shift+Q. I also don't know how to edit it to suit .xlsm.

How to do File System Task in SSIS depending on Result of Data Flow

I'm writing a (what I thought to be a) simple SSIS package to import data from a CSV file into a SQL table.
On the Control Flow task I have a Data Flow Task. In that Data Flow Task I have
a Flat File Source "step",
followed by a Data Conversion "step",
followed by a OLE DB destination "step".
What I want to do is to move the source CSV file to a "Completed" folder or to a "Failed" folder based on the results of the Data Flow Task.
I see that I can't add a File System step inside the Data Flow Task, but I have to do it in the Control Flow tab.
My question is how do I do a simple thing like assign a value to a variable (I saw how to create variable and assign them a value at the bottom pane of Data Tools (2012)) depending of if the "step" succeeds or fails?
Thanks!
(You can tell by my question that I'm an SSIS rookie - and don't assume I can write a C# script, please)
I have used VB or C# scripts to accomplish this myself. Since you do not want to use scripts I would recommend using a different path for the project to flow. Have your success path lead to moving the file to completed and failure path lead to moving the file to failed. This keeps it simple and accomplishes what you are looking for.

adding text to an xls file with bash script

I'm trying to understand if it's possible to write to an xls file with a bash script. Situation is outlined below.
I have a cronjob that runs every monday and generates an xls and emails to my client. This xls is filled with data from a MySQL DB. when the report is empty and the client attempts to open it, it shows as corrupt. Originally I addressed this issue by excluding empty files from the email with an if statement. However, the constraint is that all 4 reports much reach the client - empty or not.
So my question is, can I simply add a row of text at the top with a bash script so the file never "empty"? I'm not an expert in bash scripting by any means, so feedback here would be great. thanks!
Tony
I'm not aware of any pure bash implementation for writing XLS files. There are solutions in other languages such as Perl, Python, or PHP. If you think outside the box there is another option available to you. You mentioned that you currently use an if statement to not attach empty files. Create a blank spreadsheet in a program like MS Excel, optionally enter some text in A1 like "No records", save it, and transfer that to a known location on the server that runs the cronjob. Rather that skipping the attachment, whenever you detect an empty file in your if statement just attach the blank "No records" template XLS file. You may need to copy the template to a temporary location before attaching if you need to rename the file.

read input from html forms, execute local program,output results

I have a question that will help me understand how stuff works and investigate feasibility of a bigger plan I have in mind.
Simply given - lets assume that all things run locally - I am wondering if it is possible to:
create an html page with a form that will prompt the user to enter
the local path of an input file inputFile.dat
this input file will be fed to a c++ exe program that expects it for input
the c++ exe file will run (this exe file depends on libraries etc but lets assume all are local here)
... and will output the result on screen
It sounds simple, but is it?
Many thanks folks!
Yes, this is definitely possible, if you want to use PHP or some other scripting language.
Create a form on your web page
Add the directory of the program
Add the directory of the data
When submitted, use the PHP (or other language) exec function (docs) to execute the program, with the supplied data as argument
The exec function returns output from the program.
Display the output as wished on your page.
Good luck!