portamigra Posted November 8, 2008 Share Posted November 8, 2008 So I'll start w/ saying that I think I'm pretty code savy, but I can't seem to figure this problem out: I'm running into this issue after successfully creating a plug-in object (PIO). But, my second vectorscript (VS) doesn't seem to be working properly. I run it and get an error....we all do. So I look into it, figure out what's wrong, and fix it. Then, I run it again. So on and so on until it compiles successfully. The problem is this: After I correct an error to one of my variable names from 'RungOC' to 'Rung'. The compiler for whatever reason is still seeing 'RungOC' (like it didn't recognize the update to 'Rung') and thus I continue to get the same error! I've restarted VW multiple times, and I just restart my machine and still it seems to have 'cached' this wrong var name. Is there some way to clear an invisible 'cache' I don't know about? It's not an issue w/ the var names being different. They are the same, but vw keeps seeing the old name and it won't take the update! I've copied the code from that VS into a new one and the problem still persists. Help please! zach Quote Link to comment
maarten. Posted November 9, 2008 Share Posted November 9, 2008 Open the file users/your name/Libary/VW/2008/error ouput.txt and remove all the text in it and save it. Normally you'll get the right error then. Best is to make a backup of that one file before changing it. Quote Link to comment
Miguel Barrera Posted November 10, 2008 Share Posted November 10, 2008 What does the error message say specifically? If it is only a syntax error, you should be able to catch it by clicking on the compile script button in the editor, which tells you at what line the error is. I always use the compile button to find every instance of a variable name after I have changed it. If it is a runtime error, then you may need to add the {$DEBUG} directive to go line by line and find the error. These errors are usually values assigned at runtime such as handles or calculated values (i.e. handle = NIL or division by zero values) Quote Link to comment
portamigra Posted November 11, 2008 Author Share Posted November 11, 2008 Thanks maarten. After being gone all weekend I guess this silly mac wiped the error output file automatically, so I got the right error. I was able to fix it w/ one line of code and now it compiles successfully. Now, I know where that is and I can clear it if I need to. and thank you miguel, I'll have to experiment w/ that command Quote Link to comment
portamigra Posted November 11, 2008 Author Share Posted November 11, 2008 Here is a simple code i've created to have an interactive cable tray tool. I've created 'pop-up' and 'dimension' parameters for the variables and the tool compiles successfully. i'm having issues with the section for the ladder RUNGS. the rotate3d command doesn't seem to be working. the tool creates the rails of the ladder correctly and spaces them right. The rungs are spaced correctly, but they are created along the z-axis and according to the rotate3d, they should be rotated 90deg along the x-axis to put them along the y-axis. I have tried using pi/2 instead of 90, but it doesn't make any difference. any ideas?? Procedure CableTray; var a1, b1, c1, d1 :Real; Begin; a1:=Str2Num(pWidth); b1:=Str2Num(pDepth); c1:=pLength; d1:=Str2Num(pRung); BeginXtrd(0,a1); {RUNGS} Oval(0,0,1,1); Rotate3D(90,0,0); {Rotate about x-axis} Move3D(d1,a1/2,0.5); {Move for spacing} Duplicate(d1,0); {2nd rung} EndXtrd; BeginXtrd(0,b1); {RAIL 1} Rect(0,0,c1,1); EndXtrd; BeginXtrd(0,b1); {RAIL 2} Rect(0,0,c1,1); Move3D(0,a1-1,0); EndXtrd; End; Run(CableTray); Quote Link to comment
MullinRJ Posted November 12, 2008 Share Posted November 12, 2008 portamigra, ???You need to end your extrude before you start moving it about. As follows: BeginXtrd(0,a1);???????????{ RUNGS } ???Oval(0,0,1,1); EndXtrd; Rotate3D(90,0,0);????????{ Rotate about x-axis } Move3D(d1,a1/2,0.5);??{ Move for spacing } Duplicate(d1,0);???????????{ 2nd rung } The same applies to your third extrude: BeginXtrd(0,b1);??????????{ RAIL 2 } ???Rect(0,0,c1,1); EndXtrd; Move3D(0,a1-1,0); HTH, Raymond Quote Link to comment
_c_ Posted November 22, 2008 Share Posted November 22, 2008 I think that he simply needs to use the compiler mode. He's not reloading the script at every run: SetPref(407, TRUE); orso Quote Link to comment
portamigra Posted November 26, 2008 Author Share Posted November 26, 2008 the code compiled before just fine, but thanks mullin, it works great now Quote Link to comment
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.