Jump to content

Serious problems with VS in VW 2008


Recommended Posts

I've already reported of some oddities, but this is getting truly ridiculous:

In the script I have:



useSymbol : BOOLEAN;


useSymbol := PUSESYMBOL;


where "PUSESYMBOL" is a Boolean parameter.

Now, when running the script, I get an error message

"Line #26: useSymbol := PUSESYMBOL;


{ Error: The operands are not of compatible types. }"

What the heck is going on?

Link to comment

Thanks, but I don't have time to play these games: can't duplicate, can't encrypt, perfectly good scripts fail.

I'll just go back to 12 for any PIO development that does not rely on new features. In fact, Finnish users will be happy: they can buy excellent local content without the need to upgrade to 2008...

Link to comment

This is very discouraging. I'm not in any danger of jumping to 2008 tomorrow or the next day, but I'd really like to know why Petri's script runs in 12 and not 13.

It occurs to me that the first 4 letters of the identifiers in question are USES, which is a reserved word. This of course shouldn't be a problem, but perhaps some change has happened which make it so.

Without an answer I for one can't upgrade.

Petri: I know you're busy now and don't have time to fool with this, but perhaps in the future you might try changing those names a bit and report. I'd try it, but I don't have 2008.

Maybe somebody else might look at this. Make a simple tester in 13 that uses the same names.


Link to comment

This exceedingly simple script with those variable names works fine in 2008:

Procedure test;


usesymbol :BOOLEAN;



message('result =',usesymbol);


Run (test);

I tried it with and without default values, and it seemed to work either way.

Link to comment

Thanks, guys. Although I don't really know what all this means...

Maybe it is a fluke? No, there are no such things in programming - or are there? Something weird in my system? Should be pretty "clean".

I have the "useSymbol" parameter in many PIOs and the old ones have so far worked. Will they break if I even open the script?


Link to comment


???PIO scripts for objects execute at least twice when they are placed, one to determine the ghost outline and one to finally draw the object when you click. Could one of the executions be more guilty than the other, or affecting the other? From what you've written I wouldn't think so, but it may be worth a look.

???On the first execution no objects within the PIO exist and there are no reference points: active layer, handle to your PIO, etc. Are you using IsNewCustomObject() to isolate setup issues?


Link to comment

Actually, I'm not - I'm just trying to get the thing to work with objects placed days ago... In fact & for better or worse, I don't think I've ever used IsNewCustomObject(). Should I?

But I'm glad you brought up the ghost outline issue! Have to again submit to the wish list that I want to be able to explicitly and unambiguously tell how the Ghost is generated. In my programming style, that would, by and large, be the Make2DRepresentation -procedure, which I could just as well start to call MakeGhost...

Link to comment

Yes, I know that. I have as sensible default values as I can define and then I leave everything to the Powdered Toast User. I don't want to override user input. (I might wish to do so, but that's another thing. It is the user's prerogative to be stupid. Besides, that usually means billable hours to yours truly. A true win-win case!)

Link to comment


Sorry for raising a red herring. What this means, though, is that the error you're getting is coming from somewhere beyond the couple of lines you posted at the top. Ion has been kind enough to isolate that in a PIO that runs on v13.

I believe Ray has raised a real posibility. Maybe you should be using IsNew to determine if it's the first regeneration of the PIO, rather than the script you showed in another post (if this is the same PIO):

ok := GETCUSTOMOBJECTINFO(myName, me, recHd, wallHd);


You wrote in that thread:

"Or perhaps someone knows & reveals how to establish that the incidence of the PIO is a new object. If so, I'll donate an auto-numbering routine which this is supposed to be a part of. "

I think this is precisely what IsNew is intended for.

The problem with your construct may lie in what Ray mentioned: The first execution to establish the "Ghost". At this point the actual object does not exist in the drawing, so the handle you're getting with LObject may not be what you think it is.

On the other hand I may be entirely wrong.

You might wait and see if Ray has something to say about this. Also, it's not clear that the problem PIO in this post is the same one you write about in the others. Maybe if you posted more complete blocks of script it would be easier for someone to nail the problem.

And if this is the same PIO mentioned in other posts, I'm still interested to know why it would run in 12 and not 13.


Link to comment

AFAIK, IsNewCustomObject determines whether the object has been used in the file, not whether the current incidence is a new one.

I'm also interested to know why the same script (a .vss used via $INCLUDE) works in 12, but not in 13.


"IsNewCustomObject Objects - Custom


FUNCTION IsNewCustomObject

( objectName:STRING ) :BOOLEAN ;


Function IsNewCustomObject returns whether the specified plug-in object is a new object, indicating that the object is being regenerated for the first time.

New object status is useful in specifying initialization and setup data, as well as calling initialization specific subroutines. This function should only be called in plug-in objects."


I'm in the process of ensuring that tens of existing objects work in VW 2008 and improving them. I don't just work on one object. So far, the failure rate is 100%.


"Regenerated for the first time"? Well, that is a contradiction of terms...


I'm not sure if Ion has tested the script in a PIO. Does not look like that.

Edited by Petri
Link to comment

Yes, the documentation is confusing and can be read both ways, but it is used inside a PIO in much the same way as GetCustomInfo to get info about the current instance. I've used IsNew to find out if this instance is a new insertion or an existing one, as opposed to wether or not there are other instances in the drawing.

"indicating that the object (that the call is in, I.E. this instance) is being regenerated for the first time."

ok := GETCUSTOMOBJECTINFO(myName, me, recHd, wallHd);

IF IsNewCustomObject(myName) THEN DoSomething ELSE DoSomeOther;

I'm not 100% sure, but Ion has Pusesymbol in his script as an undeclared variable, which might indicate that this is a parametric object.

We'll have to wait for input from the others to see what's what, and I'll be happy to be corrected. Maybe somebody can explain "Regenerated for the first time" while we're at it. What DOES that mean?

Link to comment
Maybe somebody can explain "Regenerated for the first time" while we're at it. What DOES that mean?

As a non-native English speaker: a PIO can be generated any number of times. The first regeneration is the second generation. Funny that we can know that - unless that is related to the two generations in one generation.

My apologies for being literal and precise as comes to the use of the English language. If I were a native speaker, I might just be as nonchalant, ambiguous and imprecise as Americans are.

Link to comment

Hi Petri,

I actually defined it as a point object, so that not only could I try default values, but also switch the value in the info palette. I don't know if that helps you or not, but as the three most helpful people to me are on this thread (you, Raymond and Charles) I will try in anyway I can.

Once I used the Plugin, then in the Info Palette I checked/unchecked several times to make sure it did not just respond to default values.

If there is any other way I can test the values or code, let me know please, as I say, you are one of those that has helped me most, and am happy to return the favor.

Link to comment

A couple of quick thoughts after rereading the thread:

one: no kidding about the imprecise, nonchalant way we americans use the english language. Try teaching a child to speak it.... the questions my 7 year old asks, hoooey!

two: speaking of the representation, I had an issue with that recently. It is obviously loaded at startup, As I rewrote a plugin that should have changed the representation, and after making the change, in the script, I was worried when the representation was somehow stuck to the old plugin. I shouldn't have worried, as a restart fixed the issue.

Any wonder why the first question out of my mouth when someone asks me a question is, "have you restarted?

Link to comment

Yes, I have restarted. That did not at first make any at difference to anything, but later on when I was in the PIO editor of 2008 (making notes on parameters for rebuilding the PIOs in 12), I tried Duplicate once again and, lo and behold, it worked.

This is weird! I guess I have to try and use 2008 again.

Link to comment

Bad news. Another PIO, another go. This time the script wasn't nuked, but the parameters were.

Now, I was so overjoyed with even partial success that I did not make full notes or test at every step, but it goes like this:

The duplicate actually WAS created. It was visible in the Finder. It had parameters. (Before, the duplicate was visible only in the PIO editor just after making it, but not in the Finder nor after closing the editor. If it was, then there were no parameters and no script.)

Glory be, said I and played the Secret Chord (CAPS LOCK etc) and was - for the first time ever in VW 2008 - able to encrypt a PIO. The Lord was not pleased, though. The process had totally destroyed the PIO. I saw the parameters, but each and every one was listed as Missing In Action in the error report.

The unencrypted version continued to work.

Right, said I, this can't be right. So I repeated the entire process, except that before encryption I closed the PIO editor and checked the vital functions. Took a holiday while waiting for the PIO editor to reappear, encrypted with success, and the object still works!

Stop the press! New front page: It is actually possible to create and encrypt PIOs in VW 2008! Your chances of success may even be slightly higher than for a jackpot in Lotto. Consult your astrologist before attempting.

Link to comment

You know Petri, I just had a thought. one of the problems have had starting in 12, but continuing into 2008, was sometimes Finder permissions on plugins, has caused all line-returns to disappear, and that has caused plugins to fail. Mine are not encrypted, so I could see the results on the users computer.

Do yo think there is any value in checking the Permissions on your plugin folder and individual plugins?

Link to comment

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.

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