Jump to content

Miguel Barrera

Member
  • Posts

    663
  • Joined

  • Last visited

Everything posted by Miguel Barrera

  1. Looking at the definition of the function, there are missing parameters in your code: FUNCTION SetWallStyle( theWall :HANDLE; wallStyle :STRING; selectedOffDistance :REAL; replacingOffDistance :REAL) : BOOLEAN; It should be something like: .... CallTool(-208); result:= SetWallStyle(LNewObj,'Building Wall',0,0); ....
  2. Plug-In Object such as window, door, wall, stair, etc. I would think you need the same file because it only exists in a specific folder in your computer. The file is the DoorPreferences.xml located in the Plug-Ins\Common\Data folder. Modifying the user fields in this file will appear in the Data Tab of the door Settings. If the PIO is a vectorscript, you may also be able to add parameters/fields to the PIO record without breaking the script and to be safe, it should be tried on a copy first. This is more convenient because it will appear on the shape tab rather than the data tab of the Object Info Palette (OIP)
  3. You can still begin by drawing lines, joining the intersections, selecting all the lines that define the area and then calling "Compose" to create the enclosed polygon.
  4. Could it be that the function should be intVar:= GetObjectVariableInt(hbitmap,530); as listed in the VS appendix rather than a longint variable.
  5. You need to explain further which kind of fields are you trying to add to a pio. Pio's (*.vso) normally do not have a xml file associated with them. If you are referring to record fields, you can attach records to any object or add parameters to the pio object info tab through the vectorscript editor if it is a VS pio.
  6. I have not used it for a specific file yet but will be testing it in the next few days. I have thought of using the subfolder parameter and placing just one file in that folder. What I need to test is the format of the parameter, which by definition can be a partial path (Mac or Windows?). So if I place the subfolder immediately under the predefined folder index with a negative value, the subfolder parameter should be just the name of the subfolder and should search only in the one file in the subfolder.
  7. If the pdf file is large due to the original drawing size, another trick is to print to a free pdf writer to the sheet size needed, which will reduce the file size and will get rid of any metadata that may be attached to the pdf. In acrobat pro, you can may also be able to reduce the file size by using the "Optimize Scanned pdf" menu even for a regular pdf.
  8. It is a group of buildings that he wants to turn on/off by assigning a class to the group. You would want to group a collection of similar objects with a group class to turn them all on/off at once while still keeping the classes for each part of an object. Otherwise to have the same effect, you would need to turn on/off all the classes that make up the object. In a view, you would still need to turn on/off the class(es).
  9. You can pass dynarrays to procedures & functions after you allocate the size of the array. I usually create a structure for an object and then declare a dynarray of the structure so I can have a list of the objects. I know this is double work but you have to create a function that will count the object total first, allocate the array, and then pass the dynarray to a function for further processing of the list of objects.
  10. You can execute different code in the same pio by sending messages. The workflow can be something like the following: 1. Check messages. if no message (0) then do function 1. 2. Change messages to do function 2 if needed and reset object 3. Check messages, if message (1), do function 2. 4. Change messages back to no message (0). But more importantly, I am lost as to what are you trying to do. Place a 2D pio on a 3D plane? Pio's behave similar to symbols and for hybrids, the normal way is to place them on the top 2D view so that when you change to a 3D view, the 3D objects will be shown. The pio will execute both the 2D & 3D object creation in the same reset event but will only show the 2D objects on the top plan view and the 3D objects on all other views. We might be able to help further if we knew what the pio is suppose to do.
  11. I think there is a misunderstanding about 64 bit computing. 64 bit only means that there are more memory addresses available to the running programs(64 columns/bits of 0 or 1s). If you have 24GB and your running applications can function efficiently with 12GB, then you would not see any speed improvements. On the other hand, if you have only 4GB, which is the limit for a 32 bit system as Ian stated before, and the running applications need the same 12GB, you will notice a sharp slowdown because the system now needs to swap the memory between RAM and the hard disk (virtual memory). The only way a program will benefit from a 64 bit system with plenty of RAM is by multithreading, which is sending several computations at about the same time. For instance, I have a video conversion program in my laptop where I can assign the number of cores to use and with the maximum 8 cores it does the conversion in half the time as my desktop that only has 4 cores. I also have an app that monitors the core activity and it does show all 8 cores working concurrently when I run the video program.
  12. Or you can assign the crop object to a class and then you can turn on/off its visibility in the viewport class override.
  13. It is in the online function reference http://developer.vectorworks.net/index.php?title=VS:SetPolyClosed
  14. There are 2 ways you can have a closed poly: 1. The first and last vertex are at the same coordinates. 2. The last segment has its visibility turned on. Depending on which case you have, the options for each are: 1. Just delete the last vertex with: DelVertex(objectHd:HANDLE; vertexNum:INTEGER); and then do #2 also if still closed. 2. Turn off the last segment with: SetPolyClosed(polyHandle:HANDLE; isClosed:BOOLEAN); or SetVertexVisibility(h:HANDLE; vertnum:INTEGER; vis:BOOLEAN); you may also need to set the fill to 0 (unfilled) for a line string look
  15. It could be a bug with the uniform scale. To work around this use an exponential scale with a factor of 0, which is equal to a uniform scale with a factor of 1.
  16. TextWrangler is an external editor. I am referring to the vectorscript editor and this menu is available in all vw versions since criteria procedures were introduced in the late 1990's.
  17. For a white backfill, it should be the following: FillPat(1); {0 value = no fill; 1 = back color; 2 = front color} FillBack(65535,65535,65535); {The back color = white} These calls would be the same as if you had selected "solid" and the color "white" in the attributes palette. Any object created after these calls will have the white backfill.
  18. Appendix H has the names for the menus DoMenuTextByName Constants
  19. I believe you need to call the universal name which is the english edition
  20. Why don't you use the "Criteria" menu in the script editor to build the string? This is the same dialog used for building the selection criteria. Most likely, most of us old scripters use an external editor so we forget about this feature found in the vs editor.
  21. I believe by definition, symbols do not have different scales. In vw 2012, if drawn in paper units, symbols will always look the same size on print and its scale will be the same as the layer or viewport they belong to. If drawn in world units, which was the only type in older versions, the scale is always 1:1 and how they appear on paper (smaller/larger) depends on the layer or viewport scale.
  22. BTW and for the benefit of others who have not upgraded, in 2008 you could have set up your start up document the way you want with all layers, classes, etc already included and then save it as the default template "default.sta". This is the document that is opened when you double click the VW icon.
  23. Kevin, Or you change the definition of a function variable. I ran into a problem with the Extrude Along Path on vw 2010 where it could not create a curved and tapered mast arm. It worked before in vw 2008 with a "uniform scale" and < 1 "factor". After further trial and error I found that VW can only create a curved EAP with uniform scale and a factor of 1. Any other factor will throw an error. Is this a bug? My workaround was to change the scale to "exponential" but there is no documentation about the relationship between the scaling factor and the reduction/augmentation at the other end. Again, after a lot of trial and error, I found that the profile dimension ratio of the tapered end over the origin end was related to this factor and the values plotted resembled an arc. With this I can get an approximation of the tapered end which is good enough for my purposes but still would like to know what is the exact formula to get the dimensions at the other end or anywhere in between given an exponential factor.
  24. This page explains the event enabled method which should be working in 2012. Parameter change notifications A custom solution would be to save previous parameter values in hidden field(s) and then compare these with the user input to determine which parameter was changed. Once you know the input value, you can then calculate the other parameters.
  25. You also need to keep track of which parameter was changed. Depending on the VW version, you can use the event enabled method or you need to set up your own way of tracking parameter changes.
×
×
  • Create New...