Jump to content

Recommended Posts

Posted

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)
)

Posted

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)

Posted
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.

Posted

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") .

Posted
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. :D

 

But it still pops up the dialog box. I tried (c:-isogenout) and (c:_isogenout) but that didn't work.

 

Any thoughts?

Posted

What does this isogenout mean ?

Is it a Lisp function or a command call in another Autodesk programs ?

 

More info is needed .

Posted

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.

Posted

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.

Posted

Is there a way that once that lisp has finished to have it run my routine?

Posted

One solution will be to use a reactor, although I'm not sure if you can attach one to a third-part command.

Posted

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?

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...