Results 1 to 10 of 10

Thread: Communication through multiple instances of Autocad

  1. #1
    Active Member
    Join Date
    2005-12
    Posts
    63

    Default Communication through multiple instances of Autocad

    Hi there,

    I wonder if it is possible for vlisp to communicate with another instance of Autocad?? Since its possible to attach to 3rd party applications through com interface, can we utilize this inorder to run multiple Autocad sessions in parallel and work together? Handling huge lists would be faster if we could use multiple instances on multiple cpu cores! Since Autodesk won't seem to work on parallel processing for Acad we need to do something come on guys

  2. #2
    AUGI Addict
    Join Date
    2006-12
    Posts
    1,520

    Default Re: Communication through multiple instances of Autocad

    I am thinking that any savings on time will disappear in the delays communicating between separate programs and eventual max'ed out RAM useage. Better option for dealing with long delays is to re-evaluate the algorithm and optimize for minimum amount of duplicated calculations, enable early exit conditions, pre-sorting, improved logic, etc.
    If you are going to fly by the seat of your pants, expect friction burns.
    Windows XP is now over 10 years old, in software terms it makes Joan Collins look like the new kid on the block. - Statler
    Everyone else being wrong is not the same thing as being right.

  3. #3
    Active Member
    Join Date
    2005-12
    Posts
    63

    Default Re: Communication through multiple instances of Autocad

    Is it doable? In theory?

  4. #4
    AUGI Addict
    Join Date
    2006-12
    Posts
    1,520

    Default Re: Communication through multiple instances of Autocad

    Without looking too deeply into it, I'd say no. Using COM to get an active session of AutoCAD doesn't allow for discrimination between multiple sessions of the same program it just gets one (the first started?). To my mind, best investment along those lines is developing skills for creating true multi-threaded programming with the higher-level languages and using them to develop the needed tools.
    If you are going to fly by the seat of your pants, expect friction burns.
    Windows XP is now over 10 years old, in software terms it makes Joan Collins look like the new kid on the block. - Statler
    Everyone else being wrong is not the same thing as being right.

  5. #5
    Moderator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    2,492

    Default Re: Communication through multiple instances of Autocad

    Quote Originally Posted by dgorsman View Post
    To my mind, best investment along those lines is developing skills for creating true multi-threaded programming with the higher-level languages and using them to develop the needed tools.
    1+

    That's why I've started to jump from Visual LISP (which I enjoy) to .NET API, and ultimately to ObjectARX (C++ for AutoCAD).

    Visual LISP still has the higher level language beat in areas; which is why most of my .NET development (to date) is making .NET functionality available to LISP via LispFunction Methods. LoL
    "Potential has a shelf life." - Margaret Atwood

  6. #6
    AUGI Addict
    Join Date
    2006-12
    Posts
    1,520

    Default Re: Communication through multiple instances of Autocad

    Exactly. Most of my dotNET work include a separate class for defining the LISP wrapper methods so it can be used by the "real" programming . I probably should create a template for that somewhere...
    If you are going to fly by the seat of your pants, expect friction burns.
    Windows XP is now over 10 years old, in software terms it makes Joan Collins look like the new kid on the block. - Statler
    Everyone else being wrong is not the same thing as being right.

  7. #7
    Moderator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    2,492

    Default Re: Communication through multiple instances of Autocad

    Quote Originally Posted by dgorsman View Post
    Exactly. Most of my dotNET work include a separate class for defining the LISP wrapper methods so it can be used by the "real" programming . I probably should create a template for that somewhere...
    "Potential has a shelf life." - Margaret Atwood

  8. #8
    Active Member
    Join Date
    2005-12
    Posts
    63

    Default Re: Communication through multiple instances of Autocad

    Ok i got your point.. So are there any multi-threaded routines (arx/.net) out there to test some basics of the parallel processing idea. I know before even learn to crawl its not wise trying to run but if Im at a bottle neck point I would like to see the other bottles neck. İ'll be happy if you can point me to a direction, a related forum topic maybe.

  9. #9
    Active Member
    Join Date
    2005-12
    Posts
    63

    Default Re: Communication through multiple instances of Autocad

    Please let me mention another related problem. I'm running some computation based lisp routines and time consuming tasks make my win7_32bit acad2011 environment fall into not responding state (faded screen turning circle).

    I cannot sense the difference whether code really stuck somewhere or it’s running properly.
    As far as I understand Vista and 7 operating systems do not tolerate threads running on so called UI level.

    Will it do any good if I could create a background instance of acad.exe where computation takes place and be able to follow the progress from the main application? If so how can I achieve that?
    pressing esc doesn't cancel. acet-ui-progress and opendcl progress bars aren't working as expected due to screen fading out.

    Screen recording shows the behavior of a simple counter.
    (setq i 0)(while (< i 1e6)(setq i (1+ i))(princ (strcat "\n" (itoa i))))


  10. #10
    AUGI Addict
    Join Date
    2006-12
    Posts
    1,520

    Default Re: Communication through multiple instances of Autocad

    As I mentioned earlier, the first best option is to re-evaluate your algorithms. Chances are you are taking a brute-force approach which likely incorporates a number of redundancies. Something more elegant can usually take care of most of those problems.

    Multi-threading is very tricky inside AutoCAD. You can't multi-thread using anything directly connected to AutoCAD but can create threads for your own custom processes. But for the life of me I can't think of anything that would really required that kind of power.
    If you are going to fly by the seat of your pants, expect friction burns.
    Windows XP is now over 10 years old, in software terms it makes Joan Collins look like the new kid on the block. - Statler
    Everyone else being wrong is not the same thing as being right.

Similar Threads

  1. I want to allow multiple instances in the same place
    By timsea81 in forum Revit MEP - General
    Replies: 3
    Last Post: 2010-10-27, 01:02 PM
  2. Multiple instances
    By jjanis in forum AutoCAD General
    Replies: 9
    Last Post: 2010-01-22, 09:54 PM
  3. Multiple Instances of ACLT2009
    By cad.192369 in forum AutoCAD LT - General
    Replies: 4
    Last Post: 2008-10-07, 10:28 AM
  4. modifying blocks with multiple instances
    By james.126519 in forum Dynamic Blocks - Technical
    Replies: 3
    Last Post: 2008-08-16, 06:28 PM
  5. schedules on multiple sheets - instances?
    By jond in forum Revit Architecture - General
    Replies: 7
    Last Post: 2006-04-06, 08:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •