Jump to content


  • Posts

  • Joined

  • Last visited



0 Neutral

Personal Information

  • Location
  1. Hello, Here is a procedure which I use to force PIOs to redraw, and have had success where redraw, and resetbbox don't work. The idea is to change the lineweight of an object which will force the document to redraw. Procedure RD(h:HANDLE); VAR lw:INTEGER; BEGIN lw:=GetLW(h); lw:=lw+1; SetLW(h,lw); lw:=lw-1; SetLW(h,lw); END; Hope this is helpful. -Jason
  2. Unfortunately you have come across a limitation of Vectorscript. As far as I know your only option is to rewrite a script from scratch, and alter the means of inputing the necessary data. However, there are many menu commands which do have an equivalent Procedure existing in Vectorscript. If you let me know what you're after I may be able to help. -Jason
  3. Hello, I made a dialog template from the dialog builder tool some time ago, which I still use regularily. Here it is set up with a very simple STRING gathering purpose. I hope this helps. -Jason PROCEDURE dlog; Label 10; VAR dlogID,dlogResult : INTEGER; dialogIsOK,rsrcOK,nd: BOOLEAN; thestring :STRING; FUNCTION Define_Frame: INTEGER; VAR dialogID : INTEGER; BEGIN dialogID:=CreateLayout('Enter String',TRUE,'OK','Cancel') ; createstatictext(dialogid,4,'Enter String',16); createedittext(dialogid,5,thestring,16); setfirstlayoutitem(dialogid,4); setrightitem(dialogid,4,5,0,0); Define_Frame := dialogID; END; PROCEDURE Drive_Frame(VAR item:LONGINT; data:LONGINT); BEGIN CASE item OF {***Set up default values here****} SetupDialogC:BEGIN END; 1:BEGIN {*****user hit OK; gather values*****} thestring:=GetField(5); END; 2:BEGIN {*****user hit Cancel, enable GOTO to end command***} nd:=TRUE; END; END; END; {*****Main Script*******} BEGIN thestring:='Hello'; dlogID := Define_Frame; dialogIsOK := VerifyLayout(dlogID); IF dialogIsOK THEN BEGIN dlogResult := RunLayoutDialog(dlogID,Drive_Frame); END; IF nd THEN GOTO 10; message(thestring); 10: END; Run(dlog);
  4. Hello, I'm getting some strange results from the GetLocus3D Procedure. Its not a big deal, because Get3DCntr works fine on a 3D Locus. Just wanted to point this out. -Jason
  5. Jason33


    Hello All, I am working on a script/commnd which uses SetOrigin. When I use it in a document script the rulers reset to the appropriate values. However, when I use it in a menu command the rulers do not reset. In both cases all the coordinates are correct with respect to the new origin, but I'd like to see the rulers reset after the menu command. Here is an example of what I'm talking about: Procedure SO; VAR mx,my:REAL; BEGIN GetPt(mx,my); SetOrigin(mx,my); END; RUN(SO): This works as a document script, but not as a menu command. Thanks In Advance, -Jason
  6. Hello, As far as I can tell you are limited to the PUTFILE(commentsring,defaultstring:STRING; VAR filename:STRING) procedure. This gives you a standard dialog which determines the file, and destination. The filename variable contains the entire file path. I'm pretty sure that you can't get the path only from vectorscript without placing the file first. example: PROCEDURE TestWrite; VAR filename :STRING; BEGIN PUTFILE('Name File & Pick Folder','My File',filename); ReWrite(filename); WriteLn('Hello!'); WriteLn(''); WriteLn(filename); WriteLn(''); WriteL('Goodbye!'); Close(fiename); END; RUN(TestWrite); I hope this is helpful, -Jason
  7. hello, use Option C and Option V(Ctrl C and Ctrl V in windows) for cutting and pasting in both the editor and for icons. I use the Iconographer(shareware) for the mac and can cut and paste into the plug-ins properties with ease! For Windows the Iconeditor is good. here is a procedure which will gather all the classes and store them in an array. this should give you the gist of cycling through classes. PROCEDURE KLIST; VAR klass:DYNARRAY [] OF STRING; i,count:LONGINT; BEGIN i:=ClassNum; ALLOCATE Klass[1..i]; For count:=1 to i DO Klass[count]:=ClassList(count); END; RUN(KLIST); hope this is helpful. -jason
  8. hello, The problem is that duplicates are not read by vectorscript as new objects, they are placed at an undetermined place in the stacking order. They are also exact duplicates, so that as far as the object is concerned it was created when the original was created, and will always return FALSE for bool2. Put Message(bool2) in your pio script to track this. also, I used Message(GetLName(GetLayer(Ohandle))) and was able to get a valid layer name out of both the original and the duplicate, so I'm not sure what's going on there. hope this is helpful, -jason
  9. hello justin, something i've done in the past is to set an external record to the object from within the pio script. you should run a GetCustomObjectInfo at the start of your pio script: result:=GetCustomObjectInfo(name,oh,rh,wh); NewField('Plug In Record','Plug In Field','Value',4,0); SetRecord(oh,'Plug In Record'); SetRField(oh,'Plug In Record','Plug In Field',Paramater Value); just remember that you need to convert the paramater value to a string before you assign the field to the object. hope this helps, -jason
  10. hello, check out: http://www.nemetschek.net/support/custom/vscript/example.html nna provides a few example scripts including a "catalog symbols" script, which i think is just what you are looking for. -jason
  11. hello, what is the maximum number of paramaters for a pio in 9.5. is this improved in 10. -jason
  12. correction to above second duplication should read: {Second Duplication} Rotate3D(0,-45,0); Duplicate(-4,0); Rotate3D(0,45,0); DSelectall; to rotate the original back into position. -jason
  13. hello steve, here's the deal. the Rotate3D works on the last created object, and the Duplicate works on all selected objects. to make matters more complicated, the computer does not recognize duplicated objects as new objects. here's a script that i think will solve your problem. PROCEDURE Rotate5; VAR h:HANDLE; BEGIN BeginXtrd(0,1); Rect(0,2,2,0); EndXtrd; h:=LnewObj; Rotate3D(45,0,0); {Rotate 1st then duplicate then rotate back} Duplicate(4,0); Rotate3D(-45,0,0); {the following allows the process to be repeated without the above duplicate being duplicated again.} DSelectall; SetSelect(h); {Second Duplication} Rotate3D(0,-45,0); Duplicate(-4,0); Rotate3D(0,-45,0); DSelectall; SetSelect(h); {repeat if needed} END; RUN(Rotate5); I hope this helps. -jason
  14. hello, I'm not sure why it's not working. here is a small script which is working on my machine. you may need to give the rotate command before the duplicate, so there is no confusion as to what object is to be rotated. PROCEDURE Rotate; BEGIN Beginxtrd(0,1); Rect(0,2,2,0); EndXtrd; Rotate3d(-90,0,0); Duplicate(2,2); END; RUN(Rotate); i hope THIS helps. -jason
  15. hello, I have the following script/command which scales the lineweights of all selected objects. if you want to use classes you need to somehow let vectorscript know which class to search for as well as the scale factor. I like the following because a simple predefined dialog is all thats needed. PROCEDURE Lineweight; VAR pen :INTEGER; factor :REAL; h: HANDLE; BEGIN factor:=RealDialog('Enter Scale Factor','.5'); h:=LSActlayer; While h<> NIL DO BEGIN pen:=getlw(h); pen:=round(pen*factor); setlw(h,pen); h:=PrevSObj(h); END; END; RUN(Lineweight); i hope this is helpful. -jason
  • Create New...