WPerciful Posted November 20, 2013 Posted November 20, 2013 I wrote a sub-routine to update drawing borders. There is a command in CADWorx called IGO which creates isometric drawings. I wanted have this command call my function which updates the borders. But my code doesn't work. (defun c:igo ( / ) (setvar "cmdecho" 0) (command "igo") (setvar "cmdecho" 1) (runisoborderupdate) (princ) ) Quote
MSasu Posted November 20, 2013 Posted November 20, 2013 First, by using the same name for your function, you may over-write the definition from that said CADWorx. Calling of that IGO command in AutoLISP will be infuenced by how was defined - if come from an AutoLISP pack, the should use: [color=red][s](command "igo")[/s][/color] (c:igo) Quote
WPerciful Posted November 21, 2013 Author Posted November 21, 2013 First, by using the same name for your function, you may over-write the definition from that said CADWorx.Calling of that IGO command in AutoLISP will be infuenced by how was defined - if come from an AutoLISP pack, the should use: [color=red][s](command "igo")[/s][/color] (c:igo) I'm not sure I understand what you mean. Because when I attempt to test what you are saying with say the line command : (c:line) Doesn't work. But this does: (command "line") I am trying to run the IGO command so that I have it run my update function. Quote
Tharwat Posted November 21, 2013 Posted November 21, 2013 If the command that you want to run is a Lisp function , you should call it like this (c:igo) but if it is built-in command , you should call it with the command function (command "line") . Quote
WPerciful Posted November 21, 2013 Author Posted November 21, 2013 If the command that you want to run is a Lisp function , you should call it like this (c:igo) but if it is built-in command , you should call it with the command function (command "line") . Thank you. While (c:igo) didn't work I tried (c:isogenout) and that did it. But it still pops up the dialog box. I tried (c:-isogenout) and (c:_isogenout) but that didn't work. Any thoughts? Quote
Tharwat Posted November 21, 2013 Posted November 21, 2013 What does this isogenout mean ? Is it a Lisp function or a command call in another Autodesk programs ? More info is needed . Quote
WPerciful Posted November 21, 2013 Author Posted November 21, 2013 ISOGenOut is a command in CADWorx Plant (more info here). CADWorx Plant is basically add on software to AutoCAD. The ISOGenOut creates isometric drawing of a 3D model created in CADWorx Plant. When you run ISOGenOut, it brings up a “Select ISOGEN Style” dialog box, which allows you to select different styles in which the output can be created. Then it prompts the user to select objects. Then it creates isometric drawings of the model. I wrote code to update the titleblocks of the drawings it creates, but I’d like to have the ISOGenOut command trigger my code that I wrote. That way the user only has to execute one command instep of a second step. Quote
MSasu Posted November 21, 2013 Posted November 21, 2013 Since you was able to call it that way, this means that it is in fact an AutoLISP function; there is no way to prevent the dialog box to appear other than contacting the programmers of said tool to request them to include a switch for it in their code. Quote
WPerciful Posted November 21, 2013 Author Posted November 21, 2013 Is there a way that once that lisp has finished to have it run my routine? Quote
MSasu Posted November 22, 2013 Posted November 22, 2013 One solution will be to use a reactor, although I'm not sure if you can attach one to a third-part command. Quote
WPerciful Posted November 22, 2013 Author Posted November 22, 2013 I know the folder that the new created files are saved into. Could I use a reactor to trigger my code if file has been created and saved into that folder? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.