Jump to content

maarten.

Member
  • Posts

    387
  • Joined

  • Last visited

Everything posted by maarten.

  1. About the plugin: There's a standalone program for Windows that looks like VW8 and convert minicad files to VW8 files. But it seams there's also one for mac (don't know if it still works, haven't test it): http://www.vectorworks.net/downloads/fundamentals/archived_downloads.php (at the bottom of that site)
  2. distanceX:=Str2Num('your string'); GetSymLoc(handleToSymbol,pX,pY); Hmove(handleToSymbol,-pX+distanceX,0); Or when the symbol isn't placed yet on the layer: distanceX:=Str2Num('your string'); Symbol(GetObject(handleToSymbol),distanceX,0,0);
  3. Or if you want to mess things up, open VW 2 times (open VW and to open a second one: double click on the icon in the program files while holding down the "m" button) That way you can work on two files. Be aware, this could end up in some unwanted behaviour (so in other words, don't do it)! Or you can use a mac, then you can maximize on file on one screen and the other file (with the menu bar and palettes) on the other screen.
  4. Or, hide all your parameter by giving them a prefix "__" in their name, that way you only have to show them in your code, not hide them.
  5. Yes, as a resource please! And we should be able to give a class such a material-resource.
  6. Didn't test it so could be wrong. With GetObjectVariableReal(Handle to viewport,1003) you can get the scale, so then it's just your coordinates * that scale. But i think you also need the position of that viewport.
  7. Do you mean the ones of worksheets? SetObjectVariableBoolean(WShandle,82,TRUE/FALSE);
  8. I didn't read all of the posts (sorry, way to much text) so maybe it's already suggested. You could make a Apple script that runs in the background and get your data from a site and saved that in a txt or xml file. A plugin placed in you drawing could then (when manually updating) read out that data and display it. This last part (the VW plugin) doesn't sound like such a big job (can be done with VS), but it's the Apple script part that will be the hardest i think.
  9. Second that! Or even better, let us give every colour in the gradient an opacity (yes, the Photoshop way ).
  10. PenPat(-4); should be your dash style. If not, try this: Activate your dash style in the attribute palette and run this script: Message(FPenPat); Fill in the value that you'll find in the messagebox in PenPat(value);
  11. GetName Doesn't work indeed, that's because the Layers aren't part of the NameList (and GetName use that list). But SetName should work. Have you tried SetName? It works fine here...
  12. Just a guess, are there any dimensions on those walls?
  13. SetName(h,'name for the layer');
  14. copy/paste a program folder from an other mac that does have 12.5.3? But of course, backup before you do this!
  15. If they are square, you could do something like this: make an array and save the bounding box in it. Loop trough the array and see if the {x2,y1},{x2,y2} of one object is the same as the {x1,y1},{x1,y2} of an other object, if so, they connect on one side and you can add their surface. Save their new bounding box in the array. Do the same thing in the vertical direction.
  16. Normaly 2 147 183 647. But it wouldn't surprice me if you run this on a computer with little ram, it will run out of memory if you try that many. I manage 100 - 5000 resources in my scripts without a problem, it just takes some time to loop trough them though.
  17. You could use alt while draging your selection box... The reason why your selection box has to be bigger: a Callout is a linePIO. When the rotation of the PIO is not 0, the textobject inside the PIO will be rotated so that it will look horizontal. Because of that, the bounding box of the textobject is no longer {x,y},{x+TextObjectLength,y+TextObjectHeight} but it becomes a rotated bounding box (inside the pio the bounding box isn't rotated, but because the pio is rotated, the bounding box get rotated too (see attached image)). And because of that, the bounding box become "bigger" and you need to make sure your selection box reaches all the way round this bounding box.
  18. Are you sure your lines are the correct red? It has to be the 7th (i=7) colour of the "Classic VW colour palette" (wel, actually, the 8th one because white=0, black=1, ... yellow=5, green=6 and red=7) RGBToColorIndex(r,g,b,i); IF i=7 THEN h1:=hl;
  19. Didn't test it, but i think you need to add SetRecord before SetRField. ... h:=FInSymDef(h); SetRecord(h,record); SetRField(h,record,parameter,value); ... And here's an example of a dialog with Image popup in which you can select a symbol. If you want to make a list of symbols in your library, you need to replace "kFolder = 0" to something else (look in the Funct Ref under BuildResourceList for a list of the FolderIndexes). PROCEDURE Example; CONST kSymbol = 16; kFolder = 0; kImgPopRes = 100; VAR listID, numItems,diaID,MesInt: LONGINT; HBname : STRING; {sub} PROCEDURE DialHand(VAR item,data:LONGINT); VAR cnt,tmpint : INTEGER; BEGIN CASE item OF SetupDialogC: FOR cnt:=1 TO numItems DO tmpint:=InsertImagePopupResource(diaID,kImgPopRes,listID,cnt); 1: BEGIN tmpint:=GetImagePopupSelectedItem(diaID,kImgPopRes); HBname:=GetImagePopupObject(diaID,kImgPopRes,tmpint); END; END; END; {endsub} {main} BEGIN listID:=BuildResourceList(kSymbol,kFolder,'',numItems); diaID:=CreateLayout('title',FALSE,'OK','Cancel'); CreateControl(diaID,kImgPopRes,10,'',0); SetFirstLayoutItem(diaID,kImgPopRes); IF VerifyLayout(diaID) THEN MesInt:=RunLayoutDialog(diaID,DialHand); IF (MesInt=1) THEN Message('You have selected ',HBname); END; RUN(Example);
  20. Are you sure your white is really white and not almost white? Same with black? Use the first 2 of the "Classic VW colours" palette and try again.
  21. You probable have the "Insert at distance" mode active. Select the "Place symbol" tool and see in the modebar if you have the second mode (Insert at distance) selected, if so, select the first mode.
  22. Just an idea, but maybe the internal settings of your document are set to "use arrowheads" but it just isn't showing in the Attribute dialog... Happened to me before in VW2011 (not with arrowheads though). Try this script and see what it says, when "TRUE", they are indeed turned on. PROCEDURE GetIt; VAR tmpbool : BOOLEAN; tmpint : LONGINT; tmpreal : REAL; bmark, emark : BOOLEAN; BEGIN tmpbool:=GetDefaultBeginningMarker(tmpint,tmpint,tmpreal,tmpreal,tmpint,tmpreal,bmark); tmpbool:=GetDefaultEndMarker(tmpint,tmpint,tmpreal,tmpreal,tmpint,tmpreal,bmark); Message('Begin marker: ',bmark,', End marker: ',emark); END; RUN(GetIt); Run this script on a copy of your drawing (not that it wil make any changes to your drawing, but still...)!
  23. This one would work. I don't have the time now to explain the variable part though, sorry ... But ask along and i'm sure somebody would explain it how it works. PROCEDURE ImagePopTest; VAR gHatchList:dynarray[] of STRING; gHatchCount,gDlogID,gDlogResult : INTEGER; gHatchChoiceOld,gHatchChoiceNew,gCrit : STRING; gOKdlog : BOOLEAN; {Subfunction BuildHatchList} FUNCTION BuildHatchList:INTEGER; VAR temp_i,temp_cnt:INTEGER; BEGIN temp_cnt := 0; FOR temp_i := 1 TO NameNum DO IF (getobject(namelist(temp_i)) <> NIL) & (gettype(getobject(namelist(temp_i))) = 66) THEN BEGIN temp_cnt := temp_cnt +1; allocate gHatchList[1..temp_cnt]; gHatchList[temp_cnt] := namelist(temp_i); END; BuildHatchList := temp_cnt; END; {End Sub} {Subfunction Define_Dialog} FUNCTION Define_Dialog: INTEGER; VAR dialogID,i : INTEGER; BEGIN dialogID := CreateLayout('Hatch Picker Dialog',True,'OK','Cancel'); CreateStaticText(dialogID,4,'Select the old Hatch:',-1); CreateControl(dialogID,5,10,'',0); CreateStaticText(dialogID,6,'Select the new Hatch:',-1); CreateControl(dialogID,7,10,'',0); SetFirstLayoutItem(dialogID,4); SetBelowItem(dialogID,4,5,0,0); SetBelowItem(dialogID,5,6,0,0); SetBelowItem(dialogID,6,7,0,0); Define_Dialog := dialogID; END; {End Sub} {Subprocedure Drive_Dialog} PROCEDURE Drive_Dialog(VAR item:LONGINT; data:LONGINT); VAR temp_i,i:INTEGER; temp_s:STRING; result:BOOLEAN; BEGIN CASE item OF SetupDialogC: BEGIN FOR i := 1 TO gHatchCount DO temp_i := InsertImagePopupObjectItem(gDlogID,5,gHatchList[i]); FOR i := 1 TO gHatchCount DO temp_i := InsertImagePopupObjectItem(gDlogID,7,gHatchList[i]); END; 1: BEGIN gHatchChoiceOld := GetImagePopupObject(gDlogID,5,getImagePopupSelectedItem(gDlogID,5)); gHatchChoiceNew := GetImagePopupObject(gDlogID,7,getImagePopupSelectedItem(gDlogID,7)); END; END; END; {End Sub} {Subprocedure Drive_Dialog} PROCEDURE EditHatch( ObjHand : HANDLE ); VAR bool : BOOLEAN; BEGIN bool:=SetVectorFill (ObjHand,gHatchChoiceNew); ResetObject( ObjHand ); END; {End Sub} {MAIN} BEGIN gHatchCount := BuildHatchList; gDlogID := Define_Dialog; gOKdlog := VerifyLayout(gDlogID); IF gOKdlog THEN gDlogResult := RunLayoutDialog(gDlogID,Drive_Dialog); IF (gDlogResult = 2) THEN alrtdialog('You canceled') ELSE BEGIN gCrit:=ConCat('HFI=',Chr(39),gHatchChoiceOld,Chr(39)); ForEachObject(EditHatch,gCrit); END; END; Run(ImagePopTest);
  24. A wild guess, but maybe you forgot to assign the boolean to the function? This example will replace the hatch "Old Hatch" (on every object that has that hatch) with "New Hatch". PROCEDURE CHHatch; PROCEDURE EditHatch( ObjHand : HANDLE ); VAR bool : BOOLEAN; BEGIN bool:=SetVectorFill (ObjHand, 'New Hatch'); ResetObject( ObjHand ); END; BEGIN ForEachObject( EditHatch, HFI='Old Hatch' ); END; RUN(CHHatch);
×
×
  • Create New...