#1
|
||||
|
||||
... GPNTDOCU ... is not of type SEQUENCE
Hi,
I'm writing a Lisp macro that enables people too choose a standard Sketch from a couple of tables, and place it on a drawing. When I start Annotation it works fine, but when I reload the macro, and run it again I get the error: "LISP error: #S(GPNTDOCU X 845.7812432206274 Y 87.113589328035232 GPORT "Annotation") is not of type SEQUENCE." After this, restarting OSD and Annotation is the only way to get it running. This doesn't give me the feeling that the macro will be stable in "real life".... The weird thing is that I used the same code for placing a Sketch before, and this macro alway works??!! I've read somewhere that the in-package and use-package can have something to do with it, but I haven't done anything different here, either... Attached is the code of my problem-macro. Thanks in advance! Regards, Jaap |
#2
|
||||
|
||||
Re: ... GPNTDOCU ... is not of type SEQUENCE
You could probably speed up tracking down the issue by first removing the references to external files and the table definitions from your code; I don't think these are related to the problem.
One thing that I did notice is that you are using a global variable called 'bestand'. Your code assumes that it is of type string. If you happen to load some other code which also uses a variable of the same name (not too unlikely, at least if 'bestand' in Dutch means what I think it means), this could cause an error message like the one you describe. HTH, Claus
__________________
CoCreate Modeling FAQ: http://www.clausbrod.de/CoCreateModeling/ Last edited by clausb; 01-02-2006 at 08:36 AM. |
#3
|
||||
|
||||
Re: ... GPNTDOCU ... is not of type SEQUENCE
Hi Claus,
thanks for your hints. I changed the name of bestand in something else, but this doesn't do the trick Do you know if there's a way of getting a list of all variable names that OSD uses at a certain moment?? Thanks, Regards, Jaap |
#4
|
||||
|
||||
Re: ... GPNTDOCU ... is not of type SEQUENCE
Lisp has full introspection capabilities, so you could iterate over all symbols in all packages, but this is probably not the quickest way to success.
Instead, I'd recommend to strip down your code to a few lines first, at least far enough so that others can try to reproduce your problem without having to set up the same kind of configuration files which you happen to have on your U: drive. Also, do you already know exactly in which line you get the error message? Claus
__________________
CoCreate Modeling FAQ: http://www.clausbrod.de/CoCreateModeling/ |
#5
|
||||
|
||||
Re: ... GPNTDOCU ... is not of type SEQUENCE
I have now loaded your code into OSDM for several times, without getting any error messages. Also, I have stripped down the dialog to a few lines and used it to place sketches in the drawing for several times, then I reloaded the reduced version of the code. No errors, either.
In your original posting, you write: "When I start Annotation it works fine, but when I reload the macro, and run it again I get the error". I'm wondering what exactly this means. Do you load your code from a customization file, or do you load it interactively? Claus
__________________
CoCreate Modeling FAQ: http://www.clausbrod.de/CoCreateModeling/ |
#6
|
||||
|
||||
Re: ... GPNTDOCU ... is not of type SEQUENCE
Hi,
thanks again! Indeed, the macro stops working as soon as I reload the macro manually. I just did the following: - I stripped the table stuff from the macro - loaded the stripped macro - worked fine - reloaded it - still worked fine - reloaded the big macro - booom! Then I restarted OSD/Annotation and did the following: - loaded the big macro - worked fine - loaded the stripped macro - booom! So, something in the table part seems to confuse the gpntdocu as soon as I reload the macro...??!! Regards, Jaap |
#7
|
||||
|
||||
Re: ... GPNTDOCU ... is not of type SEQUENCE
So if I understand this correctly, you're not getting any error messages if you load the small version of the code multiple times?
Claus
__________________
CoCreate Modeling FAQ: http://www.clausbrod.de/CoCreateModeling/ |
#8
|
||||
|
||||
Re: ... GPNTDOCU ... is not of type SEQUENCE
Hi,
exactly! So, stripping the tables stuff out of the macro cures the problem... but also makes the macro useless I just got weird error messages while doing measurements in modeling; I suspect that all kind of things get confused by the macro I'll try stripping the tables except for one of the "categories" and see if it still goes wrong... Regards, Jaap |
#9
|
||||
|
||||
Re: ... GPNTDOCU ... is not of type SEQUENCE
Hello again,
I pinpointed the cause (not the solution!!) of the problem: as soon as I throw out the selection of the standard Sketch, and simply use a setf instead to choose the right file, everything is completely fine. So, something in this part of the code seems to cause the trouble: Code:
(rechthoekje :value-type :string :show-input-tool (sd-show-display-table "RECHTHOEK" :position '("CURRENT_WP2-OPTIONS-OPT-CONT-WP-TB" :leftCenter -10 0)) :hide-input-tool (sd-hide-display-table "RECHTHOEK") :after-input (progn (setf bestand1 rechthoekje) ) ) Can't see the connection to the problem, to be honest Regards, Jaap |
#10
|
||||
|
||||
Re: ... GPNTDOCU ... is not of type SEQUENCE
By "selection of the standard sketch", do you mean this line in (doit):
Code:
(setf bestand (format nil "U:/csn/OSD_Modeling_13.20/Symbool/TN/~a.mi" (sd-string-replace bestand "." "_"))) To test my hypothesis, do the following before executing your test sequence:
Now execute the test sequence and monitor the console window. It should report all calls to sd-string-replace including the passed parameters. Both parameters should always be strings. Now, if the problem really manifests itself in this line, I still do not understand is how this code could possibly be executed simply by loading the Lisp file. Can you please describe *in detail* what you do to reproduce the issue? Claus
__________________
CoCreate Modeling FAQ: http://www.clausbrod.de/CoCreateModeling/ |
#11
|
||||
|
||||
Re: ... GPNTDOCU ... is not of type SEQUENCE
Hi Claus,
thanks again for the tips. This problem is getting quite a learning experience for me I did the following: - started Annotation - started the trace - loaded the macro; the trace says: sd-defdialog TRUMPFSTEMPELS... - used the macro to load a "standard Sketch". On pressing the Apply button trace says: 1> (OLI:SD-STRING-REPLACE "TN22510" "." "_") <1 (OLI:SD-STRING-REPLACE "TN22510") :GO :OK (sounds logical to me!) - reloaded the macro; trace says: sd-defdialog TRUMPFSTEMPELS... - used the macro again; as soon as I pick the position, I get the infamous error message, BUT I don't get anything new from the trace window. By the way, the stripped macro that works does still have the sd-string-replace lines in it. So, apparantly the trouble is somewhere else??!! Here's what the debugger says when the error occurs: Error: LISP error: #S(GPNTDOCU X 1063.60832392254 Y 5.1063204043614414 GPORT "Annotation") is not o f type SEQUENCE. Signalled by UPDATE-TOGGLE-DATABacktrace: > evalhook > trumpfstempels > let > m acrolet > labels > frame2::eval-action-terminateal > frame2::framed-eval-action- loop > lambda-closure > locally > block > tagbody > let > cond > if > frame2::ha ndle-transition > frame2::trigger-action-state-transition-event > eventrocess- event > exec-pers-entry > lambda-closure > pers::trumpfstempels-update-dependent -variables > let > if > progn > pers::update-variable-ui > update-toggle-data > display_error Broken at PERS::UPDATE-VARIABLE-UI. Doesn't make it very clear to me.... Kind regards, Jaap |
#12
|
||||
|
||||
Re: ... GPNTDOCU ... is not of type SEQUENCE
OK, so there goes my theory about sd-string-replace. Thanks for the update!
If only I could somehow reproduce the issue. Do you also get this in a "clean" version of OSDM, i.e. without any other customizations loaded? Also, which version of OSDM are you using for your tests? Claus
__________________
CoCreate Modeling FAQ: http://www.clausbrod.de/CoCreateModeling/ |
#13
|
||||
|
||||
Re: ... GPNTDOCU ... is not of type SEQUENCE
Good tip, Claus!
Interesting: when I test it with OSD 12.01, everything is fine. No problems whatsoever. My OSD 12 is set up to load the same macros as our OSD 13.20, except for am_load_plot_table_ex (which is a new OSD 13 command). So the problem is OSD 13 specific... I'll try and test it in OSD 13.20 without loading other macros. Regards, Jaap |
#14
|
||||
|
||||
Re: ... GPNTDOCU ... is not of type SEQUENCE
update: just tested the macro with an "empty" OSD/Annotation 13.20 (no other macros loaded), and still got the same error...
So, it's probably not caused by other macros. Jaap |
#15
|
||||
|
||||
Re: ... GPNTDOCU ... is not of type SEQUENCE
Jaap,
I can now reproduce the problem as well. I'm using the attached reduced version of the original code; to run the code, you need to have a sketch file at c:/temp/foo.mi. Note that this stripped-down version does not even use logical or display tables anymore. Sequence to reproduce the issue on my system:
I find the behavior quite puzzling. Something in the guts of OSDM starts to choke on this code, but I'm not sure why. It might be worth reporting this as an issue to CoCreate support, in fact. Can you reproduce the problem on your system using my version of the code? Claus
__________________
CoCreate Modeling FAQ: http://www.clausbrod.de/CoCreateModeling/ Last edited by clausb; 01-05-2006 at 05:49 AM. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | Rate This Thread |
|
|