AutoCAD .NET :: Lisp Function Not Working In MEP 2012

Aug 26, 2011

i'm trying to create a LispFunction in vb.net in visual studio 2010 (tried both .net 3.5 and .net 4.0) and it's like autocad is just ignoring them. is there a setting or something to disable .net LispFunctions from being loaded? CommandMethods work just fine, and i'm not seeing any errors. in fact i'm using the most basic of functions, just returning the arguments. and nothing. Any diagnostic or something to determine what's the matter?
 
<LispFunction("HelloWorld")>Public Function HelloWorld(args As ResultBuffer) As ResultBuffer Return argsEnd Function does nothing, when i setq a variable on it, it's just nil.

View 1 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: No Function Definition With Distance Function

Oct 25, 2013

This seems absolutly silly.

(setq p1 (getpoint))
(setq p2 (getpoint))

(setq Dist (distance p1 p2))

Why does this not work?

I'm trying to build a command to replace AutoCAD's "DI" command, to give distance and delta x, y, and z values in decimal and imperial, and keep the angles in XY plane and out of XY plane.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Script File To Open Multiple DWG File Not Working In 2012

Dec 22, 2011

I am trying to make a script file to open a drawing and run a lisp routine. They both work independently just fine, the script file will open the all of the files fine... and the lisp is in the startup suite and works in all the files. But when I tell the script file to open the first drawing then run the lisp it hangs trying to open the next file after running the lisp. I have Filedia set to 0, but the message I get when it goes to open the next is "No canvas exists. click New Canvas." (And on top of that... Filedia even set back to 1 still does not display the Dialog box anymore, I have to shut down AutoCAD 2012 and start again then it works.) I Have tried several ways, Opening one at a time then run lisp, and open all files first and then try to run lisp (that closes the file after running) and try and run it again in the next... It will only run the lisp one time and then locks up from there.

View 7 Replies View Related

AutoCAD Inventor :: Finding Scale Factor Function In 2012?

Aug 4, 2012

i want to ask is there any scale factor function in Autodesk Inventor 2012?

this is because all my drawed part are already full constrained and I want to enlarge it to some factor?

View 1 Replies View Related

AutoCAD Map 3D :: Dtext Function Not Working?

Mar 3, 2013

have just loaded 2013 along with service pack.

dtext function not working. when doing dtext but using the insertion point of some previous text. will not move to next line unless some text placed on first line. is there a setting, no issue in 2011

View 1 Replies View Related

AutoCAD LT :: Group Function Not Working

Jun 9, 2005

ACLT2000 on a Windows XP machine.

In the last day, one of our users has lost his ability to Group. Whether he selects objects and then pulls down "Group" from the tools menu or vice versa, the objects do not group. The command line text doesn't give any errors or other indication of what is happening.

View 3 Replies View Related

AutoCAD .NET :: Possible To Call Lisp Function After BeginDocumentClose Event?

May 15, 2011

I am currently in the process of re-writing my VBA in .net.In VBA I successfully used AcadDocument_BeginClose which called lisp functions.It would be nice to have all code in the same environment I need to transition my changes.

Therefore I need to call lisp from .net.My function works well when run withing the cad files session but does not appear to call the lisp when called after the BeginDocumentClose.

Is it possible to call a lisp function after the BeginDocumentClose event?

View 1 Replies View Related

AutoCAD .NET :: How Lisp Function Interpret Lists Passed In

Jun 20, 2012

I had thought this was fixed in 2012, but it seems that lists passed in to a lispfunction, get interpreted as if the first items was a dotted pair code.I first noticed this on a tool that takes three integers as an rgb color.

On some values, it shows null for the args in.On some, it reinterprets as if I am passing in a point.

If I pass in '(1 2 3), I get (5009, (1,2,3)) in .net so that is a 3d point.

Note that this alone is a bug, as its a list of three integers, not a point.

If I pass in '(10 20 30), I get (10, (20, 30, 0)) in .net

If I pass in '(228 27 185), I get null in .net

If there is going to be any interpretation going on, it should be because I sent in a dotted pair list. How Autodesk wants us to pass in lists so they come in as just a list of values sent in. URL....

View 6 Replies View Related

AutoCAD .NET :: Build LISP Function To Return Selection Set?

Aug 29, 2011

Is there any way to build a LISP function in .Net to return a selection set? 

View 1 Replies View Related

AutoCAD Inventor :: Select Other Function Is Not Working Or Turned Off?

Apr 9, 2012

I can't get the select other function to work.  When doing a measurement, if I right click on an item, then click "select other", nothing happens.  This also is the case when applying constraints. In application options, the select other timer is set to 2.0 sec., it is not set to off.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Set Function To Radio Buttons

May 7, 2013

simple example code how can i set my lisp function to radio button ?

i found simple dcl - lisp codes , there is possibility for calling simple cad commands , but this is different about call lisp with buttons

which code i have to change and how  for set my lisp on radio buttons ..

here is the sample codes ...

SAMPLE1 : dialog {           label = "Sample Dialog Box Routine - Part 1";           : column {             : boxed_column {               : button {                 key = "but1";                 label = "Button 1";     

[Code].....

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Expire Date For A Function

Nov 27, 2012

I want to define en expiration date in registry, after that date the some LISP programs does not allow to run. I think that suitable commands are SetEnv and GetEnv.

define a ExpDt variable that contains Expiry Date as a string. And add some statements inside of the LISP program to call this variable and check it with today's date.

I should define once time in autocad:

(setenv "expdt" "130101"); YYMMDD date for validation period (2013.01.01)

and check this every time that a lisp program should be execeute:

(getenv "expdt") ; if today's date(with YYMMDD format) ">" expdt then lisp program doen not allow to run and should be halted.

for e.g. on 2013.02.28: "130228" > "130101" ==> so the lisp function should be halted and will not work!

(without any alert or message)

a sample list function: (how can implement on this lisp function?)

(defun c:3()
(setq w t)
(while w
(setq a (getpoint "
pick point:"))
(setq p1 (list (- (car a) 0.5)(- (cadr a) 0.5)))
(setq p2 (list (+(car a) 0.5)(+(cadr a) 0.5)))
(command "erase" "w" p1 p2 "")
(command "INSERT" "*3" a "" "" "0")
)
(if (= a nil)(setq w nil))

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Math In Foreach Function

May 15, 2013

In the foreach function can you use math like (foreach pt1 (add 1) so that foreach one you pick it adds one the next one will be named pt2 then pt3 and so on.

View 6 Replies View Related

AutoCAD Inventor :: 2014 Paste Function Not Working Properly

Dec 14, 2013

When I paste an item in the assembly, the item is thrown off in space.  It places it so far away that it is not even in the view window.  I have to stop what I doing, do a find in window and then drag it close to where I need it.  Then I can start constraining it.

Why does it not place the item at my coursor location like it used to?  

I am using SP1.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Create A Pop Up Menu Triggered By A Function Key?

Dec 29, 2011

I would like a small menu to pop up near the cursor like the middle mouse button menu, but based on some other function key or quick key shortcut. 

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Compiled Function Definition Error

Aug 17, 2012

The error below has appeared randomly when AutoCAD 2011 is started.  There was not an error of this sort, but it suddenly appeared and some of the LISP routines will no longer work. 

*Invalid attempt to access

a compiled function definition.  You may want to define it using defun-q:

#<SUBR @000000003f5fda98 S:: STARTUP>

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating Array Using Split Function?

Jan 10, 2013

In asp I'd write:

arrFileName = Split(DrawingName, "_")

JobNumber = arrFileName(0)
DrawingTitle = arrFileName(1)

SheetNumber = arrFileName(2)

I'd like to do the same thing in lsp. I don't want to be limited to three fields so the split function is perfect.Is there an equivalent?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Function For SELECTED ALL Object In Drawing?

Jun 3, 2013

How to make a lisp command that will select all objects in the drawing?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Object Reactor And Load Function LSP

Mar 13, 2012

I open the drawing without loading the function, when I modify an object with the reactors appears the following error message:

function definition: NAMEFUNCTION

You can avoid this annoying message without removing the persistent reactors? 

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Define A Function With Negligible Arguments

Jun 25, 2013

I prepared a code to calculate number of days between two date.

I want to know how can I define negligible arguments for my lisp routins. It means if I omitted the arguments, lisp code can handle it without any errors ("; error: too few arguments")

In this case, my program defined as:  (TotalDays 1st_date 2nd_date)

(TotalDays 1978 03 21 2013 06 25)

and I want to have flexibility: if I use this routine as (TotalDays 1978 03 21), the program should substitute today's date with second date.

I know if I put "nil" instead of date for 2nd_date, It will not be an error, because:

(if (and y2 m2 d2) (setq n2 (GetJDN y2 m2 d2))(setq n2 (fix (getvar "DATE"))))

but that's not my favourite!, how can I omitted 2nd_date completely? as (TotalDays 1978 03 21)

Here is my lisp

;|How to use:(TotalDays 1978 03 21 2013 06 25)|;;;;;By Abbas Aqdam(defun TotalDays ( y1 m1 d1 y2 m2 d2 / n1 n2)(setq n1 (GetJDN y1 m1 d1))(if (and y2 m2 d2) (setq n2 (GetJDN y2 m2 d2))(setq n2 (fix (getvar "DATE"))))(abs(- n1 n2)));;;;Leap years are included;;;;By Abbas Aqdam(defun GetJDN ( year month day / a y m J)(setq a (/(- 14 Month) 12))(setq y (-(+ year 4800) a))(setq m (-(+ Month (* 12 a)) 3))(setq J (-(+ day (/(+(* 153 m) 2)5) (* 365 y) (/ y 4) (/ y 400)) (/ y 100) 32045)))

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: STRNUM Error - No Function Definition

Jan 10, 2012

I D/L a lisp file (setvars.lsp) that purports to give a list of system variables that match a short string entered in a dialog box.

Unfortunately, an error arises that says 'error : no function definition: STRNUM'

I've looked at the code and can't tell what the writer was hoping to achieve.

The specific section is as follows:

    (if F1
      (progn
        (setq RL (read-line F1))
        (while RL
          (if (and (wcmatch (strcase RL) (strcase (strcat "*" DESCR1 "*")))
                   (wcmatch (strcase RL) (strcase (strcat "*" DESCR2 "*")))
[Code] .........

There is no other mention of STRNUM in the whole of the lisp.

There is an accompanying setvars.dat, wherein apparently, the writer compiled a data file of all the system variables in AutoCAD2008, each variable being followed by an '=' and then a description of the variable.

If necessary I can post the whole lisp and dat file, but was hoping to discover the intention from the above extract and therfore where I might work out an alternative to this line.

Looking to turn a string to a real? If so, why are there two 'arguments' following the 'function' STRNUM?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Upgrade Function To Grab Multiple Blocks?

Jan 23, 2012

I was able to find/update a LISP program that returns the dynamic block to its original state, overriding the anonymous name and make the actual block name the effective name. I am in the process of manipulating the LISP program so I can select multiple blocks rather than one at a time.

(defun CYMEFFEC ()(vl-load-com) (setq obj (vlax-ename->vla-object (car (entsel "Select blocks: ")))) (vlax-put obj 'Name (vlax-get obj 'Effectivename)))

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Insert Block In A Specific Layout Using Function

Jan 28, 2012

I would like to insert a block in a specific layout (eg. "LAYOUT13") using the function vla-insertblock

I have already searched the web and this newsgroup but have not found the solution.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Commands Not Finishing After Calling Script Within Function

Nov 15, 2013

I have a simple lisp function to add a scale axis to a drawing by calling a script, renamed the drawing by appending "withScale" to the file name, and then closing the file. I placed a call to the function in the acad.lsp file in the startup suite. The idea was to batch process all files by simply opening them. Upon open the startup acad.lsp file runs, which calls my lisp function, which in turn calls the scale script. It should then execute the renaming, saving, and closing commands. The problem is that it is calling the script fine and renaming the file, but it does not save the changes before closing. Here is the lisp function
 
(defun saveScale(); (command "-purge" "all" "" "n")(if (findfile "C:/Users/Russell/Desktop/TreeFiles/Automation/Scale&Key.scr")(command "_script" "C:/Users/Russell/Desktop/TreeFiles/Automation/Scale&Key.scr")); end if (command "_.zoom" "e") (command "_saveas" "2013" (strcat (getvar "dwgprefix") (vl-filename-base (getvar "dwgname")) "withScale.dwg")) (command "close") ) (saveScale)
 
Apparently you cannont run any lisp commands after calling a script, however the renaming still follows through.

I've attached the script file as well. (I couldn't attach .scr format so you may need to rename it).

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Passing A List Of Points To Function Instead Of User Input

Sep 16, 2013

I have a list function that asks for the user to pick points when it is run. It looks something like this (foo arg1 arg2) When invoked it asks the user to pick points and press enter when done It.

Instead of getting the points from the user i want to pass it a list of pre-defined points. The code cannot be changed so I must use it as is.Is this possible, if so how can it be done?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Return To Calling Function After Trapping Error In Subroutine

Mar 13, 2012

I've got a subroutine that gets the centroid of a closed polygon (lwpoly).  It appears to fail if the polygon has any zero length line segments.  I've added a trap that catches the error and "highlights" the offending polygon, but it stops there and does not return to the main function that called the subroutine.  Is there a way to get back to the main function from the trap?

Here's the subroutine (original function by _gile (Autodesk LISP Forum 9-18-2006):

(defun return-centroid (lwpoly space / obj Region Centroid)
(setq *error* trap1)
(setq obj (vlax-ename->vla-object lwpoly))
(setq Region (vlax-invoke space 'addRegion (list obj)))
(setq Centroid (trans (vlax-get (car Region) 'Centroid) 1 0))
(vla-delete (car Region))

[code]....

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Function To Print Out Entire List Of Selected Entity?

Oct 28, 2011

I am looking for a function to print out the entire entity list of the selected entity...

so... walking down through the entity data... print out what it finds... any time it encounters an entity name... then do an entget and print that out too.

View 8 Replies View Related

Photoshop :: (save As) Function Not Working?

Sep 12, 2012

I just installed the trial version of CS6 and it's working great so far, except for one major problem. I can't use the "save as" function at all, when I click it, it does nothing. No errors messages, just nothing.

View 4 Replies View Related

Photoshop :: Text Function Not Working

Nov 9, 2008

I've not written out a profile and Im brand new here.

But what Im asking for help with, is this :

Whenever I go to use the text tool in my Photoshop cs3 extended it says the function was unable to work because something prevented it from initializing.

View 1 Replies View Related

Lightroom :: Export Function Not Working?

Jun 8, 2012

The export dialog box seems to work.  I hit EXPORT and it goes to export.  Then the operation gets stuck and the image won't export. 

View 3 Replies View Related

Lightroom :: Overwrite Function Not Working

May 28, 2013

I'm new to Lightroom so I might be screwing this up somehow. I pick the Overwrite without warning option on the export function. I've noticed that it pops up the dialog saying X file will be replaced. I click Ok and go to my pictures library and only the unedited original is there.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved