• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

run nelle macro

  • Thread starter Thread starter device0712
  • Start date Start date

device0712

Guest
Good morning, everyone.
Does anyone know, if it exists, a method to launch an external executable from a registered macro? or if there is a chance to do so in any way?
Thank you.
device
 
you have to use the vb bees of pro/e.
find everything in the help online.
greetings
 
thanks ozzi... I will try
device
Nothing.
among other excuses if I omitted it but if you have correctly installed creo or proe, you should also find pdf and examples in the program installation directory under the folder:
vbapi
if you don't have the ptc setup and in the options of the toolkit category api toolkit, find the subcategory visual basic bees.
 
I found more or less everything....I managed to create a program that connects to the active cad instance (async) and to read the list of the parts.
I wanted to ask you: How can I run this program from within proes?
Is there a way to educate proes to launch an external exe by using the mapkey instructions of the macros?
this only to 'associarle' my exe to a clickable button from cad.
thanks and greetings
device
 
Good morning, everyone.
Does anyone know, if it exists, a method to launch an external executable from a registered macro? or if there is a chance to do so in any way?
Thank you.
device
vb bees allow you to read and write the proe session, which is very useful.
but if your need is just to launch an external executable, just create a macro with this syntax:
mapkey Lancia_notepad @systemnotepad;by changing the config.win (right click above the icon bar) you can easily create a button that points to your macro.

with this system you can clearly launch the exemplary you did with the vb bees

Hi.
 
Hi, Nicksoft.
I tried with your directions....with notespad everything ok
I have inserted this macro but it doesn't work:
mapkey lance_mio_exe @systemc:\mdl_prd\s_proe\matchdistintawin\debug\matchdistintawin.exe;

I probably write down the path of the exe that I have to launch..... do they serve apics or similar things to identify the exe command? ?


greetings and thanks
device
 
Hi, Nicksoft.
I managed to launch my vbnet executable from a macro as you told me... but I have a problem... ..it locks everything by sending the attached message.
There seems to be a problem related to the synchronicity.
if I launch the ex vbnet without passing from pro/e it is all right, it connects and does what it must, if I run it from pro/e instead it blocks everything. .
What am I wrong?
this the macro of pro/e:mapkey lancia_mio_exe @systemc:\\mdl_prd\\s_proe\\matchdistinta\\matchdistinta\\bin\\debug\\matchdistinta.exe;this the vbnet code that I use for connection:private session as ipfcbasesession
dim asyncconnection as ipfcasyncconnection = nothing
asyncconnection = (new ccpfcasyncconnection).connect(nothing, nothing, ".", 5)
session = asyncconnection.session
Can you help me?
greetings and thanks
device
 

Attachments

  • Clipboard01.webp
    Clipboard01.webp
    14.9 KB · Views: 47
Hi, Nicksoft.
I managed to launch my vbnet executable from a macro as you told me... but I have a problem... ..it locks everything by sending the attached message.
There seems to be a problem related to the synchronicity.
if I launch the ex vbnet without passing from pro/e it is all right, it connects and does what it must, if I run it from pro/e instead it blocks everything. .
What am I wrong?
this the macro of pro/e:mapkey lancia_mio_exe @systemc:\\mdl_prd\\s_proe\\matchdistinta\\matchdistinta\\bin\\debug\\matchdistinta.exe;this the vbnet code that I use for connection:private session as ipfcbasesession
dim asyncconnection as ipfcasyncconnection = nothing
asyncconnection = (new ccpfcasyncconnection).connect(nothing, nothing, ".", 5)
session = asyncconnection.session
Can you help me?
greetings and thanks
device
I had never tried to launch a program made with vb bees from inside proes; even to me from the same mistake, while from "outside" proes works well.
You can see that from inside you can't reach the com server for some of its limitations. .
 
I have solved by launching a .bat which throws me the desired executable.
I think the error is due to the fact that if you launch the .exe pro\e directly can not close "in time" the dos window and then still have that active operation, which overlaps with what you would like to do the executable.
launching the .bat instead seems to give him time to finish the macro and therefore does not go into conflict.
this solution I used it to make the macro that automatically opens the table of the active part by launching from inside pro\e opendrw

I hope I've been helpful
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top