none
Creating a application that can communicate with other application (in different process). RRS feed

  • Question

  • Hi there,

    I am struggling with writing a good title for my question, I do not know the correct words to describe it, but bare with me.

    I have created a ADDIN for a 3D drawing program Autodesk Inventor, now I wan't to create a stand-alone program that can be communicated with to do some specific tasks. Important is that this program must not be run from the same process or it will not work!

    How can I create a program and communicate with it without it being in the same process? I only know of command-line communication but this is too limited for my requirements.

    If you have more questions please shoot!

    Greeting


    Tuesday, June 5, 2018 6:56 AM

All replies

  • A MemoryMappedFile is a often a very good way to communicate complex data between processes.

    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    Tuesday, June 5, 2018 11:55 AM
    Moderator
  • A MemoryMappedFile is a often a very good way to communicate complex data between processes.

    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    Is a active X application something to consider? I have read some things about this.
    Tuesday, June 5, 2018 12:06 PM
  • Is a active X application something to consider? I have read some things about this.
    Not really... ActiveX is a dated technology so it would not be recommended for new development.  Take a look at the documentation for in-memory MemoryMappedFiles; that should be about the best/easiest way for you to communicate between the add-in and another application running on the same machine.  If you are interested in your secondary application communicating with the AddIn across multiple machines, then I would probably suggest a simple IP implementation with UDP and/or TCP connections.

    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    Tuesday, June 5, 2018 12:21 PM
    Moderator
  • It would be helpful if you described the nature of the communication that you wish to establish between your AutoDesk Inventor add-in and the external process.  For example, is the communication to be only one-way?  Do you intend to only transmit data?  Do you want the external process to be able to invoke any of your add-in's methods?  How is the external process to be started?  By the user? By the add-in?

    Tuesday, June 5, 2018 1:00 PM
  • Named Pipes would be an easy IPC solution:

    https://code.msdn.microsoft.com/windowsapps/Interprocess-Communication-858cc9c7


    Paul ~~~~ Microsoft MVP (Visual Basic)

    Tuesday, June 5, 2018 1:16 PM
  • It would be helpful if you described the nature of the communication that you wish to establish between your AutoDesk Inventor add-in and the external process.  For example, is the communication to be only one-way?  Do you intend to only transmit data?  Do you want the external process to be able to invoke any of your add-in's methods?  How is the external process to be started?  By the user? By the add-in?

    The external process would be a started by the user ( it's a copy files tool that repairs internal references )

    Data transmitted

    1. On process start: Path of file to copy (can be nothing), current active file path.
    2. On process end: New path of the copied file ( can be array of path's ) if multiple copies were made.

    I could work with a temp text file and write the lines and read those from the addin when the process is ended. But that seems not professional?

    Tuesday, June 5, 2018 1:30 PM
  • I don't believe that using a temporary file is "unprofessional".  Plenty of commercial software uses them.

    The thing to think about is whether IPC methods like memory mapped files or named pipes can better meet your needs.

    • Edited by RLWA32 Tuesday, June 5, 2018 2:07 PM
    Tuesday, June 5, 2018 2:04 PM
  • .... I do not know the correct words to describe it, but bare with me.


     It is called Interprocess Communications.  You can read through that msdn link to see the different options you have and which methods are best for your requirements.

    If you say it can`t be done then i`ll try it

    Tuesday, June 5, 2018 4:33 PM
  •  But that seems not professional?

    With the knowledge you show currently, the solution you make the first time will be recognized as not professional. 

    Therefore first solve this on the easiest way and than start thinking about "professional" in this minor part. 


    Success
    Cor

    Tuesday, June 5, 2018 4:40 PM
  • There's been several threads about Autodesk Inventor you may want to read here "VB.Net search results for Autodesk - most recent thread ".

    Also Autodesk Inventor has an API.


    La vida loca

    Wednesday, June 6, 2018 4:32 PM