Jump to content

Miguel Barrera

Member
  • Posts

    663
  • Joined

  • Last visited

Everything posted by Miguel Barrera

  1. If VW was not a better alternative to AC or MS, it would have been extinct by now. It reminds me of the mid 1990's when all you saw was wintel machines and then the media was predicting the fall of the Mac, although we, the users, knew all along the Mac was a better machine. I can only assume that such absurd arguments come from misinformed individuals that do not know in depth the differences between and strenghts of each package. I am a Civil Engineer where VW is non-existing and the field is full of AC & MS users. Nonetheless, I use VW to its fullest and am able to produce better quality plans in a fraction of the time than my counterparts. To me it makes more sense to use the best tool for your needs than whatever everybody else is using just because you do not know any better.
  2. If you want to be more creative, you can also use buttons, which will be the group titles, to toggle the visibility of parameters but it will require to turn on events and keep a log of each button state (opened and closed submenus).
  3. I checked Pantone 5757C from two sources and the RGB values are R = 106 G = 112 B = 41 and these values are the same given in Vectorworks. And the equivalent calculated CMYK color is C = 5.35% M = 0.00% (I believe you have M & Y switched) Y = 63.39% K = 56.08% which I verified with a color converter at CMYK - RYB color converter
  4. You can also install the free VirtualBox with your copy of Windows XP to run VW 11. Even though you are running Windows XP on emulation, it will probably be as fast or faster than your old computer.
  5. The other possible solution is to use the SDK to create the plugin. You can add an Internet API to the plugin, which Apple and MS provide for stand-alone apps, as the means to get the required information. However, the drawback with VW programming, whether VS or SDK, is that it cannot run plugins in the background to update and display the information dynamically. You would still need to do this manually or create a condition that will trigger the plugin to reset itself.
  6. Just to expand on the hybrid design, pio's work similar to symbols. If the symbol only has a 2D component, then the same geometry shows in 2D & 3D view. But if the symbol has both 2D & 3D objects, then the symbol displays the appropriate geometry for the current view. As Josh explained, the 2D & 3D objects need to be included in the code and VW will choose which objects to display. I do wish there was a way to regenerate the pio on a view change. Although the scheme makes it easy to create a hybrid pio, it also adds code that is always compiled no matter the view. When working in 2D, there can be noticeable delays if the compiled 3D objects are very complex.
  7. You should also filter only symbols before the call to GetSymRot. The compiler usually gives an error if the object handle is not appropriate for the function. IF GetType(h) = 15 THEN BEGIN rot:= GetSymRot(h); ... ... END; For most 3D objects, you should use Set3DRot instead which accepts symbols. SetRot3D only works for extrudes and sweeps. And even if the function was the right one, the object would not rotate because the angles are all zeros. It should be something like: Set3DRot(h,0,0,-rot,symX,symY,symZ); Furthermore, if the symbol has only a 2D component always use HRotate such as: GetSymLoc(h,symX,symY); rot:= GetSymRot(h); HRotate(h,symX,symY,-rot);
  8. Note that "feet and inches" is only for display purposes but the document's primary unit for this display type is inches. So any values returned by functions are always in inches. Linear measurements would be divided by 12 to get feet and areas by 144 (12x12) to get square feet. I do not use "space objects" but I suspect that the pio does the calculation internally depending on the display type and presents the result in the Object Info Palette as a parameter. Consequently, in a worksheet you would simply access the value of the parameter without further calculations.
  9. As a spreadsheet you can do calculations on each cell so all you have to do is divide the area function (in the header row) by 144 to give you sq ft.
  10. I tested both procedures with the following script: PROCEDURE TestPioLoc; VAR objHdl: HANDLE; origPt1,origPt2: POINT3D; BEGIN objHdl:= FSActLayer; IF objHdl <> NIL THEN BEGIN GetSymLoc(objHdl,origPt1.x,origPt1.y); GetSymLoc3D(objHdl,origPt2.x,origPt2.y,origPt2.z); Message('GetSymLoc = ',origPt1.x,', ',origPt1.y, ' & GetSymLoc3D = ',origPt2.x,', ',origPt2.y,', ',origPt2.z); END; END; Run(TestPioLoc); and got the same coordinates so I do not know why you would get different results. I tested on the stake object and the custom pio I created and got the correct coordinates on both. Note that I did all the testing in VW 2008 so I hope is not a bug in 2011
  11. Try importing with a different format like jpg, png or even pdf and see if it makes a difference.
  12. You cannot edit a raster image (composed of pixel data) in VW or any other CAD program for that matter. CAD programs can only edit vector images (composed of lines, polygons, etc.). You would need to edit the photos in an image editor like Photoshop or the free GIMP app before importing into VW.
  13. Have not tried this function yet but it seems this is what you want. FUNCTION SetVPClassVisibility( viewportHandle :HANDLE; className :STRING; visibilityType :INTEGER) : BOOLEAN; visibilityType values: -1 invisible, 0 visible, 2 gray
  14. What, it cannot be done? I use the polyline with the cubic spline point mode all the time to trace over existing street curves and can match it fairly easy. I will accept that it takes a bit of practice to get used to the tool but once you figure out how it works, you can draw and modify any type of curve, specially using the cubic spline which adjusts to the edge of the curve and is always tangent to the previous curve.
  15. 1. Actually this has always been a problem depending on the zoom factor. I made my own stake object due to the limitations of the stock one and added a locus at the top so it does not matter the zoom factor it will always pick the topmost object in the pio and if there are other objects nearby I can locate the stake origin by the label "locus". 2. For plug-ins, the origin can be found with: PROCEDURE GetSymLoc(pioHndl:HANDLE; VAR x,y:REAL); or PROCEDURE GetSymLoc3D(pioHndl:HANDLE; VAR x,y,z:REAL);
  16. I did not mean to confuse you. When I said the text rotates, I meant internally in the callout pio itself. The line is always drawn horizontal and the text is rotated inside the pio.
  17. Callout text will always be horizontal to the design or sheet layer. It takes the leader line angle in the OIP and rotates the text by the same angle so it always looks horizontal. If you need to rotate the plan then use a viewport on a sheet layer and add the callouts to the sheet layer either outside the view or as annotations inside the view. This way you can always rotate the view but the callouts will remain horizontal.
  18. Depending on your target version, vsoWidgetSetVisible may not work as it was only resently implemented. For this reason, I only add the parameters that I want visible in the OIP with FUNCTION vsoAppendParamWidget( parameterID :LONGINT; text :STRING; data :LONGINT) :BOOLEAN; which will work with VW 2008 & up.
  19. PROCEDURE DoMenuTextByName(subMenu:STRING; index:INTEGER); submenu = Menu command name index = 0 for single commands; 1-n for menu groups (chunks) More complete description at: DoMenuTextByName
  20. To combine strings you use the function Concat as in newString:= Concat(string1,string2,string3); All the string functions will be under the section Strings in the VS function reference. Unless every file needs to have different classes, I would use file templates as much as possible but if you still want to go with scripts, a good starting point to learn VS is to set all your classes in a VW file and then export it as Vectorscript. You can access external data as text (txt,csv,xml, etc.) or even a database through ODBC which was recently added to VW (but I am not sure if it really works as advertised yet)
  21. Yes, it is a bug where the length of the returning Dynarray is not reset to the changed string. By reassigning aString with aString:= Concat('',aString); {or probably any other string function} immediately after the function call, the length will be reset. PROCEDURE TestString; VAR shortstring : STRING; aString : DYNARRAY[] OF CHAR; PROCEDURE ChgText(VAR varString: DYNARRAY[] OF CHAR); BEGIN varString:= 'The string has been modified'; END; BEGIN aString:= 'Only 13 chars'; ChgText(aString); aString:= Concat('',aString); shortstring:= aString; Message(shortstring ); END; run(TestString); and Message will display the full string.
  22. I would create a line PIO with 1 or 2 control points. The first click to determine the midpoit and start of the first seating row and the second click to set the center of the arc. The first control point would be to set the beginning angle of the arc and maybe a second control point to set the end angle if the seating is not symmetrical about the midpoint. It may be the way the PIO is designed. I know from experience that anytime you introduce an infinite loop in the PIO it will crash VW. I have a feeling that GetPt which goes through an event loop is timing out or is terminated after a set number of iterations.
  23. Let's not get char and string arrays mixed up and that is why I picked these two to show the difference. The DYNARRAY OF CHAR, which is a single variable string of 2M char maximum, does not need to be sized before but it needs to be assigned before passing to a procedure/function as a parameter. The DYNARRAY OF STRING, which is an array of strings with 255 char each, as well as any other VS and user defined types, need to be sized before passing to a procedure/function.
  24. You probably need to explain in more detail what you are trying to do because I still do not understand. There might be other ways to accomplish the same task by using control points.
  25. You do not have to size DYNARRAY[] OF CHAR before passing it to a procedure as a variable parameter; you only have to assign text to the variable before passing it on: PROCEDURE TestString; VAR aString: DYNARRAY[] OF CHAR; PROCEDURE ChgText(VAR varString: DYNARRAY[] OF CHAR); BEGIN varString:= 'The string has been modified'; END; BEGIN aString:= ''; ChgText(aString); Message(aString); END; However, other types of Dynarrays do need to be sized before passing to a procedure or function: VAR strArray: DYNARRAY[] OF STRING; ... PROCEDURE ProcessStrArray(VAR strList: DYNARRAY[] OF STRING); BEGIN ..... END; BEGIN ... totItems:= 20; Allocate strArray[1..totItems]; ProcessStrArray(strArray); ... END;
×
×
  • Create New...