PDA

View Full Version : .Net function



giskumar
4th Dec 2010, 07:06 am
Hi all,

I am new to dot net.
I would make a dll with some globle functions which i can access through the lisp.

For example i want to make a function which returns all vertices in polyline in list format to assign a lisp variable.

Can any one guide me how can i make this possible.

Thanks,
Kumar.

giskumar
6th Dec 2010, 05:13 am
Hi all,

after some research i found that a solution to return variables in form of list from dll command.

This is availabel from the version of Autocad 2007.

Follow this link:

http://through-the-interface.typepad.com/through_the_interface/2006/07/

FYI

Thanks,
Kumar.:)

Kelly Dwayne
18th Jan 2011, 02:22 pm
Hello Mr.giskumar!

For this Autocad edition will be the problem because of unsupporting errors and moreover,just install proper edition to get the dll command.


_____________
.NET Application Development (http://www.benivolent.com/dot-net-development-company.html)

Tyke
18th Jan 2011, 02:48 pm
Why on earth do you want to call a DLL from LISP? Just do it all in lisp, it makes much more sense. DLLs are version sensitive LISP is not.

In my opinion you should do it either all in .NET or all in LISP

BlackBox
18th Jan 2011, 03:12 pm
... i want to make a function which returns all vertices in polyline in list format to assign a lisp variable.



Just do it all in lisp, it makes much more sense. DLLs are version sensitive LISP is not.



Example:



(defun c:FOO (/ e)
(vl-load-com)
(if (and (setq e (car (entsel "\n >> Select Polyline to List Vertices: ")))
(wcmatch (cdr (assoc 0 (entget e))) "*POLYLINE"))
(vlax-get (vlax-ename->vla-object e) 'coordinates)))



Modify for your use.