Jump to content

maarten.

Member
  • Posts

    387
  • Joined

  • Last visited

Everything posted by maarten.

  1. have a look at SetVectorFill in the Function Reference.
  2. http://techboard.nemetschek.net/ubbthreads.php?ubb=showflat&Number=151361#Post151361
  3. Hi Pat Nice script! With GetPickObjectInfo, you can get the handle of an object inside a wall. Ofcourse, it will no longer work on the selected object but the user has to click on an object to get the information. Not sure if that's what the user wants... ... Var H1 ,H2, H3 :Handle; S1,S2,S3,S4,S5,S6 :String; N1,N2, N3, tmpN :Integer; WSH :Handle; B1 :Boolean; x,y :Real; Begin GetPt(x,y); IF GetPickObjectInfo(x,y,H1,H3,tmpN) THEN Begin IF H3<>NIL THEN H1:=H3; H2:=GetRecord(H1,NumRecords(H1)); {get a handle to the first record} ....
  4. "Library" It's short for "Bibliotheek", which is Dutch for "Library".
  5. This is a bug indeed, I noticed somewhat the same behavior some months ago. I tried different things but I was hold back everytime because you can not allocate a VAR parameter and you can not return a dynarray in a function. So I ended up using a Array[1..20000] of CHAR in my variables and in my VAR parameters of my functions an procedures. That worked, not fast (but that wasn't a problem, it was a script to run at night), not sure if it will work fast enough for you too Sleg. I really hope that one day, NNA will get rid of that ridiculous max of 255 chars for strings... This isn't the '80s anymore
  6. userfolder of Vectorworks\Settings\Eyedropper Tool\
  7. It is not possible according to the VS Language guide (see "What VectorScript Can't Do") The only thing i can think of is working with favourites. When you add that file on your server to your favourites (in the resource browser), a shortcut to that file will be added to your library and you can make a list of that with BuildResourceList.
  8. It isn't that hard to get this: 1: Select all 2: Ctrl+click on one of the selected objects => you just duplicated every selected object on that layer... So maybe that happened in you drawing?
  9. Two workspaces? But be aware, the position of the palettes are also saved in one of the user settings files, those overrule the positions of the workspace.
  10. I noticed the same some weeks ago, it's a bug and Vlado informed us that it will get fixed in VW2012 Vlado on the VS mailinglist:
  11. Christiaan, it really isn't that difficult, it's only an annoying thing to do, but in less then 5 minutes, you'll have your hatch with only 12 levels. for your first lever, fill in these values: Start Point L=0mm A=0? Repeat L=3mm A=0? Dash Factor Factor=0,1 Offset L=3mm A=0? Duplicate that level (Add Level), move its Start Point to the end of the dash of the previous Level (1) and count +60? with the A's of Repeat and Offset (add it first to the Offset, otherwise you'll get an error message). So you'll get: Start Point L=0,3mm A=0? Repeat L=3mm A=60? Dash Factor Factor=0,1 Offset L=3mm A=60? repeat the previous step until you'll have full 6 Sized Regular Polygon (or whatever it is called in English). Ok, so now you have a quite repetitive hatch. We'll add an other "circle" to the hatch that will break the pattern. adjust the pen colour of the 6 Levels, that way you'll have visual control of what the "old circle" and what the "new cirle" is. Duplicate the first Level and give it an other colour the Start Point doesn't matter now, put it somewhere you like. Make the Repeat and Offset 2x bigger but the Dash Factor 2x smaller. Give that line an angel of 15?. So you'll get this: Repeat L=6mm (this is now 2x bigger then the previous "circle") A=15? Dash Factor Factor=0,05 (this is now 2x smallerthen the previous "circle") Offset L=6mm (this is now 2x bigger then the previous "circle") A=75? And now again, duplicate that Level, position it at the end the previous Level and add 60? to the A's of Repeat and Offset. repeat previous step until you have your "circle". And there you have your hatch, now you can give it on other colour if you want.
  12. You're welcome . This probable isn't the best example to study because it's a little bit to complex for what it does (i used the dialog from an other more complex script and took out what wasn't necessary but didn't strip it down to the basics). But look the functions up in the online Function Reference, there are to the point examples with more information in it.
  13. Here's a way of doing this with a ListBrowser. You can multiselect your worksheets in this script to update more then one. PROCEDURE Example; VAR Listid,ListNum : INTEGER; id,tmpint,cnt : INTEGER; Bool : BOOLEAN; {sub} PROCEDURE MakeDialog; BEGIN id:=CreateLayout('Some title',false,'Ok','Cancel'); CreateLB(id,100,30,15); SetFirstLayoutItem(id,100); END; {sub} PROCEDURE DialInst; VAR CInt : INTEGER; BEGIN {make a column in the LB} CInt:=InsertLBColumn(id,100,1,'Name',190); Bool:=SetLBControlType(id,100,CInt,5); Bool:=SetLBItemDisplayType(id,100,CInt,3); {fill that column with the WS} FOR cnt:=1 TO ListNum DO tmpint:=InsertLBItem(id,100,cnt-1,GetNameFromResourceList(Listid,cnt)); END; {sub} PROCEDURE HandOK; VAR NumSelLB : INTEGER; BEGIN NumSelLB:=GetNumSelectedLBItems(id,100); FOR cnt:=0 TO GetNumLBItems(id,100) DO IF IsLBItemSelected(id,100,cnt) THEN BEGIN RecalculateWS(GetResourceFromList(Listid,cnt+1)); END; END; {sub} PROCEDURE DialHand(VAR item,data:LONGINT); BEGIN CASE item OF SetupDialogC: DialInst; 1: HandOK; END; END; {sub} PROCEDURE DialogWorkSheets; BEGIN MakeDialog; IF VerifyLayout(id) THEN tmpint:=RunLayoutDialog(id,DialHand); END; {main} BEGIN Listid:=BuildResourceList(18,0,'',ListNum); IF ListNum<>0 THEN DialogWorkSheets ELSE AlrtDialog('No worksheets where found in this drawing.'); END; RUN(Example);
  14. There's a difference between a Tool and a "Object"-tool. A tool needs a click for activation, a commando doesn't. (for more info about this: http://techboard.vectorworks.net/ubbthreads.php?ubb=showflat&Number=127652&Searchpage=1&Main=26522&Words=click&Search=true#Post127652) Try making a menu commando out of it.
  15. Sorry, i don't have the movie anymore... I don't even have an idea what the movie was about.
  16. maarten.

    Prefs

    Doesn't Chr(39) also work?
  17. I've made some changes, I hope Brudgers don't mind... These are the things I've changed: - every Begin-End can be fold - every Case-End van be fold - all numbers will be recognised - all strings between '' will be recognised. - some colors has changed Any errors and/or adjustments are very welcome. The file is a zip file, so please replace the .pdf by .zip!
  18. Yes, in this thread you'll find out how to get a list of an other file: http://techboard.nemetschek.net/ubbthreads.php?ubb=showflat&Number=151679#Post151679 For records, use type nr 47 in the Procedure BuildResourceList.
  19. When you have the longint value (the converted handle), loop trough all the object, convert their handles to longint and see if they match with the one you're looking for?
  20. True, but you can also adjust the dialog in this part. So it's not only to save the output but also to change the data in the dialog or the layout of the dialog.
  21. a litlle tip: if you want to create rotated hatches, the easiest way to do that is (imo) to create the hatch NOT rotated first (so all lines are vertical or horizontal). That way you can use the coordinates. After that, switch back to the "angle modes" and ad "+45?" to all the angles of all the line layers.
  22. I tried to do this ones, but i couldn't make it work properly with passing values or Handles, so i never finished or used it. You need to use PROCEDURE callback; in stead of callback :PROCEDURE;. PROCEDURE test; PROCEDURE Calling; BEGIN HRotate(LNewObj,0,0,25); END; PROCEDURE SomeThing(PROCEDURE InternalCall); BEGIN InternalCall; END; BEGIN Rect(0,0,10,10); Rect(10,10,20,20); SomeThing(Calling); END; RUN(Test); If you manage to pass values or Handles through these Procedures, can you post them here, for i'm very interested in it .
  23. I don't know enough about Events so no idea how to do this, but can't you evoke something like this without clicking in the drawing by double clicking on the pio's icon? That way you can use one key (but you need to hit it twice though).
  24. When you use CreateExtrudeAlongPath or CreateTaperedExtrude, what happens when you select all those NURBS and combine them with Add to Solid (or whatever it's called in English, it's under the Model menu)? Normally you can then subtract that from an extrude.
×
×
  • Create New...