Jump to content

maarten.

Member
  • Posts

    387
  • Joined

  • Last visited

Reputation

1 Neutral

Personal Information

  • Location
    Belgium

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Yep, that's a know thing, it's documented in the function reference: http://developer.vectorworks.net/index.php/VS:HExtrude When looking up functions I don't use to often, I use the online function reference, because there are things that aren't present in the offline version. The offline version is more of a stripped down, fast version.
  2. You can create a wrapper function that will create extrudes based on two 3Dpoints: FUNCTION BlockByBBox (p1, p2: POINT3D): HANDLE; BEGIN BeginXtrd (p1.z, p2.z); Rect (p1.x, p1.y, p2.x, p2.y); EndXtrd; END; Or something like this: FUNCTION BlockByBBox (p1X, p1Y, p1Z, p2X, p2Y, p2Z: REAL): HANDLE; BEGIN BeginXtrd (p1Z, p2Z); Rect (p1X, p1Y, p2X, p2Y); EndXtrd; END; But I don't realy understand what you try to accomplish... With this script, I get somewhat the same result. PROCEDURE Silver_Constant; CONST Psi = (1 / 2 + Sqrt (23 / 3) / 6) ^ (1 / 3) + (1 / 2 - Sqrt (23 / 3) / 6) ^ (1 / 3); TYPE DDD_ARRAY = STRUCTURE X : ARRAY [0..7] OF REAL; Y : ARRAY [0..7] OF REAL; Z : ARRAY [0..7] OF REAL; END; VAR P, L : DDD_ARRAY; a, z, n : LONGINT; SD : REAL; Obj_H : HANDLE; FUNCTION Block (p1, p2, l1, l2: REAL): HANDLE; BEGIN BeginXtrd (p1, l1); RectangleN (p1, p2, 1, 0, l1, l2); EndXtrd; END; BEGIN SD := RealDialog ('Enter the dimensions of the smallest block', '100'); FOR a := 0 TO 7 DO BEGIN FOR z := 7 DOWNTO 0 DO BEGIN FOR n := 0 TO 7 DO BEGIN P.X[a] := SD * (SD - (SD * Psi ^ a)) / (SD - (SD * Psi)); P.Y[z] := SD * (SD - (SD * Psi ^ a)) / (SD - (SD * Psi)); P.Z[n] := SD * (SD - (SD * Psi ^ a)) / (SD - (SD * Psi)); L.X[a] := SD * Psi ^ a; L.Y[z] := SD * Psi ^ a; L.Z[n] := SD * Psi ^ a; Obj_H := Block (P.X[a], P.Y[z], L.X[a], L.Y[z]); Obj_H := Block (P.X[z], P.Y[a], L.X[z], L.Y[a]); END; END; END; END; RUN (Silver_Constant); Be aware that you're creating a lot of objects that have the same dimension and position. Is this neccesary? Maybe if you tel us what the result should be, we could help you better?
  3. Indeed, and the good thing about Concat is that it doesn't add any decimal digits if there aren't any. That's why I suggested that it could have solved it too (9 will be 9 after Concat).
  4. Using Concat() to make a string of a number could have solved it too I think. I use it sometimes because it converts almost anything to a string (even a Handle).
  5. Not completely sure, but is that variable a Real? If so, what happens if you make it an Integer or Longint?
  6. Did you search in the appendix for it or did you ran trough all variables. I'm asking because some of those are just not documented. I run trough the variables if I can't find it in the appendix. I make a for-loop and write all the values to a text file. Then I search for the specific value and knows what the selector is. Script is something like this: Append(fileName); FOR i:=-3000 TO 3000 DO BEGIN Write(i); Tab(1); Write(GetPref(i)); Tab(1); Write(GetPrefInt(i)); Tab(1); ... Write(GetPrefString(i)); END; Close(fileName);
  7. Hi all Does anyone have a full list of the things you can fill in when you select "Custom" in "Tag Header" or "Tag Body"? It seems that this isn't listed in the Help.
  8. You can get the handle to the definition with symDefH:=GetObject(GetSymName(symH));
  9. If you have the handle to the symbol definition, this below should work. ObjH:=FInSymDef(SymDefH); WHILE ObjH<>NIL DO BEGIN IF GetTypeN(ObjH)=15 THEN BEGIN {this is a symbol inside your master symbol} END; END;
  10. I don't have a VW at the moment, but this should work: to get the symbol in the wall: symH:=FIn3D(WallH); to get the door inside the symbol: symN:=GetSymName(symH); doorH:=FInSymDef(GetObject(symN)); Maybe this one will work as well: doorH:=FInSymDef(symH); When you have more then 1 object in your wall, you need to loop trough them all with: symH:=NextObj(symH); UNTIL symH=NIL; Best is also to check the type of the object (should be 15 for symbol (or 16 for symbol definition)): objType:=GetTypeN(symH); And the same thing when you have more then one object in your symbol: doorH:=NextObj(doorH); UNTIL doorH=NIL;
  11. I believe the problem with GetView/SetView is that when you're in "2D/Plan" view, after the execution of your PIO, the view will be "Top".
  12. Are you really sure you need to switch the view to create the geometry? I believe that extrudes along (nurbs) path could do what you want without having to change the view. I'm just asking because changing the view by a PIO is not such a good idea qua performance.
  13. In the one I posted, folding should work. You have to make sure though to place your BEGIN and END; as first words. So this doesn't work normally: IF ... THEN BEGIN END; While this does work: IF ... THEN BEGIN END; I think a newer version can be found on the Notepad++ site.
  14. I have a Dutch version with an AZERTY keyboard with different workspaces, so I have no idea how it is called in your version or even what the shortkey is... Sorry. But it is the command that can join two selected lines (or in other words, stretch 2 lines to the point they have in common).
  15. Maybe I misunderstood you, but I believe the "join lines" menu command can do this. Select 2 walls and call that command. (so if you have a shortcut to that command, I believe you'll have what you want, I've used this for years and it was very fast imo)
×
×
  • Create New...