Author Topic: Plotting automatisation  (Read 2768 times)

0 Members and 1 Guest are viewing this topic.

Xplod

  • Guest
Plotting automatisation
« on: January 29, 2009, 08:39:38 AM »
Hello everyone,

I need help to complete this lisp. I currently run into 3 problems. If any guru here can help solve it, it would be greatly appreciated. Excuse me if my english is bad, it is not my native language. Part of this lisp come from the Afralisp site and it's call Q-Plot.

Ok, fisrt thing, This lisp is working as following : User is asking for a window, then a dcl open a window with some choice of plotting configuration, when the choice is made, it show a preview of the window, when you hit ESC, it ask if you want to continue or cancel, when i hit continue, everything go fine, but i'm not able to figure how to do the cancel one. This is my first issue.

Then, i would like to put some selection on my window with choice to ask user two things : If he only want to plut the current tab, of if he want to plot all paper space tabs.

Last thing, i would like to have to possibility to be able to to use publish with those, so again, radio button for choice, then if you hit the publish one, he send the plot using publish.

If someone could take a look at it, and do something with it, this would surely be something that others can use.

Thanks!


T.Willey

  • Needs a day job
  • Posts: 5251
Re: Plotting automatisation
« Reply #1 on: January 29, 2009, 12:25:22 PM »
<snip>
..... when i hit continue, everything go fine, but i'm not able to figure how to do the cancel one. This is my first issue.
It looks like you can use the system variable ' LastPrompt ' for this.  If you plot, then it will say so.  Examples from a little test.
Canceled plot = "Press ESC or ENTER to exit, or right-click to display shortcut menu."
Continued plot = "Plotting viewport 2."

.... Then, i would like to put some selection on my window with choice to ask user two things : If he only want to plut the current tab, of if he want to plot all paper space tabs.
[ http://www.theswamp.org/index.php?topic=1916.0 ]
This is Alan's ( CAB ) plot tabs routine.  You should be able to find what you want there.

Last thing, i would like to have to possibility to be able to to use publish with those, so again, radio button for choice, then if you hit the publish one, he send the plot using publish.
When I did my plot routine with lisp, I had to either plot it more than once when in the drawing, or had to repeat the list of drawings to plot the number of times that I want them plotted.

Hope that helps.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

psuchewinner

  • Guest
Re: Plotting automatisation
« Reply #2 on: January 30, 2009, 10:25:20 AM »
Write the info to a "DSD" (drawing set description - I believe) and run the publish command from VLisp.  It works for me.  I am currently working, when I have a chance, on a new version of my QPlot routine that will plot multiple un-opened drawings by automating the publish command.

Xplod

  • Guest
Re: Plotting automatisation
« Reply #3 on: February 03, 2009, 03:09:47 PM »
Thanks for hint

But my lisp knowledge is not the best around. Can someone take my lsp and write down, at least the part for the cancel command to work ? I need this as soon as possible. I've try to make it work for one week but i always bump into some error.

Thank you

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Plotting automatisation
« Reply #4 on: February 03, 2009, 07:40:58 PM »
Try this modification.
« Last Edit: February 05, 2009, 02:04:38 PM by CAB »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Xplod

  • Guest
Re: Plotting automatisation
« Reply #5 on: February 05, 2009, 12:12:51 PM »
Thank's Cab, but there seem to be a problem, when i select ok after the preview, i get the same message as the cancel button : user quit. I've take a look at the lisp, and i could not figure where the error is.

Also, just to know, is there a possibility to ask the user if he want to plot only the current tab or all the tabs ?

Last option, is there a way to add the publish command to this lisp ?

Thank you for your advice

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Plotting automatisation
« Reply #6 on: February 05, 2009, 02:04:24 PM »
Oops.
Try this one.


Yes
and
Yes
 8-)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Xplod

  • Guest
Re: Plotting automatisation
« Reply #7 on: February 05, 2009, 04:46:27 PM »
Hello again Cab

Another error. This is the message i hot when i click ok for printing

Command: ; error: An error has occurred inside the *error* functionbad argument
type: stringp nil

Can't see where is coming from

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Plotting automatisation
« Reply #8 on: February 05, 2009, 10:00:37 PM »
The error is most likely that the variable LayOut is undefined.
You need to set it.

As for the error message An error has occurred inside the *error* function
you have an active error handler that should not be there. This is from a lisp you ran previously
and the error handler for it was not localized. To turn that error handler off use
Code: [Select]
(setq *error* nil)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Plotting automatisation
« Reply #9 on: February 05, 2009, 10:33:57 PM »
The error is most likely that the variable LayOut is undefined.
You need to set it.

As for the error message An error has occurred inside the *error* function
you have an active error handler that should not be there. This is from a lisp you ran previously
and the error handler for it was not localized. To turn that error handler off use
Code: [Select]
(setq *error* nil)

alan, if you nil out the *error* function, doesn't that mean you won't have any error function for routines that are not written with one?
i'm really asking this because i've been trying to figure out what routine i have loaded that keeps nilling out the *error*.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Plotting automatisation
« Reply #10 on: February 05, 2009, 11:56:30 PM »
Setting to nil restores the built in primary lisp error routine.
It kills the one your lisp activated & did not nil.

Only this the primary error routine does is report the error message.

Problem with poorly written error handlers is that when used outside the lisp they were designed for is that they create errors themselves.
Thus the message: An error has occurred inside the *error* function  8-)
« Last Edit: February 06, 2009, 12:02:29 AM by CAB »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Xplod

  • Guest
Re: Plotting automatisation
« Reply #11 on: February 06, 2009, 11:48:46 AM »
Thanks for the help,

However this routine was working very well before i try to add the preview function, and i never give a value to the layout variable.

Can you give me a hint how to solve the problem ?