Author Topic: Is there an equivalent to commandflags.session for LispFunction?  (Read 2913 times)

0 Members and 1 Guest are viewing this topic.

AIYOUNG

  • Guest
Hello all,


I would like to define an entry point into a .dll using LispFunction so that i can pass values into LISP for the purpose of performing automated software tests. Basically, the entry point defined by LispFunction will run the code without user input and return a message saying if the code ran successfully or if it failed.


The main program, however, uses Sendcommand to call other lisp functions that need to be called sequentially. For the normal entry point that allows for user input, i use commandmethod with commandflags.session enabled.


Is there a way to call a lisp from autocad when using LispFunction as an entry point?


Alternatively, is there a way to pass values to LISP when calling a .dll from an entry point defined by commandmethod?


Thanks in advance for your suggests/help!

gile

  • Gator
  • Posts: 2507
  • Marseille, France
Re: Is there an equivalent to commandflags.session for LispFunction?
« Reply #1 on: April 29, 2014, 02:14:00 AM »
Hi,

The LispFunctionAttribute class don't have constructors using a flags argument as CommandMethodAttribute. Anyway, LISP is a document level API.
Speaking English as a French Frog

AIYOUNG

  • Guest
Re: Is there an equivalent to commandflags.session for LispFunction?
« Reply #2 on: April 29, 2014, 08:47:30 AM »
That's what i figured.


Is there any way to put values into a result buffer or some other object using a entry point defined by commandmethod?


The end game is that i want to call all of my programs via a script, have them run some test cases, and then write the results to a file.

WILL HATCH

  • Bull Frog
  • Posts: 450
Re: Is there an equivalent to commandflags.session for LispFunction?
« Reply #3 on: April 30, 2014, 01:17:35 AM »
for what it's worth, I say just learn c#

it's much easier to work with than lisp in the long run

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: Is there an equivalent to commandflags.session for LispFunction?
« Reply #4 on: April 30, 2014, 03:38:54 PM »
All tools have their uses.  Sometimes you need a pen knife, sometimes you need a scalpel, and sometimes you need a chainsaw, body bag, and dump site.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

Andrey Bushman

  • Swamp Rat
  • Posts: 864
Re: Is there an equivalent to commandflags.session for LispFunction?
« Reply #5 on: April 30, 2014, 03:54:48 PM »
i can pass values into LISP for the purpose of performing automated software tests.
This forum is for .NET topics. Are you need testing the LISP code, or maybe you need testing the .NET code? If the second, so you are inventing the bicycle (Gallio are exists). Via Gallio you can test and LISP code too (through launching them in the .Net tests), as I think.
« Last Edit: April 30, 2014, 04:01:48 PM by Andrey Bushman »

AIYOUNG

  • Guest
Re: Is there an equivalent to commandflags.session for LispFunction?
« Reply #6 on: April 30, 2014, 08:32:01 PM »

This forum is for .NET topics. Are you need testing the LISP code, or maybe you need testing the .NET code?


Lispfunction is a part of .net and that's what my question is about.



Quote
If the second, so you are inventing the bicycle (Gallio are exists). Via Gallio you can test and LISP code too (through launching them in the .Net tests), as I think.


I've heard about Gallio from "CP2654: Automated Testing with the AutoCADŽ .NET API".


Gallio hasn't been actively worked on since 2012.


Since the code i am working on has to support AutoCAD 2012 to 2015 and beyond, i'm looking for a more long term solution.

Andrey Bushman

  • Swamp Rat
  • Posts: 864
Re: Is there an equivalent to commandflags.session for LispFunction?
« Reply #7 on: May 01, 2014, 01:56:59 AM »
I've heard about Gallio from "CP2654: Automated Testing with the AutoCADŽ .NET API".
Gallio hasn't been actively worked on since 2012.
This is no problem. I use the Gallio for testing the AutoCAD 2009-2015 plugins successfully.
Since the code i am working on has to support AutoCAD 2012 to 2015 and beyond, i'm looking for a more long term solution.
Gallio sources:
Code: [Select]
git clone https://github.com/Gallio/mbunit-v3So you can compile the Gallio.AutoCAD.PluginNNN.dll library yourself, if you need it in the future. I did it for AutoCAD 2015 (the Gallio.AutoCAD.Plugin200.dll library), but the Gallio.AutoCAD.Plugin190.dll works fine with AutoCAD 2015 too.