Jump to content

Miguel Barrera

Member
  • Posts

    663
  • Joined

  • Last visited

Everything posted by Miguel Barrera

  1. Vectorscript is based on the Pascal Language, so if you can get a hold of a book from your local library, it will help you understand the sintax and programming flow.
  2. I am surprised that not many use the $debug directive to troubleshoot the code. If used, it will show you how many times it runs the reset event. In using this feature, I discovered that if you create an object and later delete it in the code, it will make the reset event run twice. You really do not notice this if the code is a few lines long but if you are changing thousand of objects at the same time, the difference may be significant. Peter, In addition to using Push & PopAttrs, you can also create the objects with the default settings and then change the object attributes with calls like SetTextFont which uses the handle of the new text (LNewObj) as a parameter. This way you do not have to mess with the default settings at all.
  3. I never had to send a mac for repair and the one I have is still functioning after 10 years. My windows HP I had to send to the factory before a year due to a malfunction of the hardware so that says a lot about the quality of the components used. As for hard drives, it is a piece of cake to swap or add another to the mac without the use of utility programs to configure it. Before, you had to buy specifically for the mac and had to pay the price for it but nowadays, you can use the same hard disks that are installed on pc's.
  4. I believe the greatest advantage a mac has over a pc is the integration of hardware and the system software. I started on the Mac and just loved the fact that I seldom had any problems with it. If I ever had a problem with software or extensions, it was very easy to fix by booting up with another system folder I kept in another partition and then just trashing the incompatible software or extension. Now try troubleshooting a problem with the pc and it is a nightmare to the point where is just far better to just reinstall windows and all the software than spend countless hours trying to figure out what is wrong. I get windows updates almost every day and while they fix a specific problem, they seem to mess up other funtionality. I have a few programs including VW that were working great initially but now crash or some functionality does not work as before. So the time is coming for me to update backup documents, scrap everything from the computer and start all over again. I never had to do this with a mac.
  5. I believe this is where you fail to fully understand the power of VW and its advantage over other CAD packages. Except for the inability to have multiple windows with different views, the core technologies are superior to others and you can certainly mimic or create better workflows than other packages through programming. You can add intelligence to these objects and even establish communication between them so that if you modify one, another can adjust accordingly. The problem most of the time is that the user knows what he wants but cannot change the software to work his way and the programmer knows how to change the software but only has the essential knowledge to offer what he thinks the user needs. VW does not offer a Civil Engineering module but yet, I still use it to design roads and traffic signals. I could have used Microstation since it has the tools to do a decent job but it still would not give me what I need in the end and it also lacks the "intelligence" to do the job faster. In Landmark, the only tool that is essential to my projects is the DTM and everything else has been developed. I even had to program my own "import survey" command because the one included in VW did not meet my requirements. So where are we at with BIM? This is certainly something that could have been achieved with VW since the inception of hybrid and plug-in objects. The objective of BIM was on my mind when I created Wall Framer where every piece of material had information attached to it. This facilitated not only the reporting of a bill of materials but also potential conflicts with other building elements. To me the basic problem with BIM at the moment is that it lacks a common platform where all the different CAD programs can exchange this information. Every CAD company is trying to pitch BIM the best way that it fits their own software and to influence others to follow their way of doing things. This is the problem with dwg or dxf as a CAD exchange format where you cannot have a transparent conversion because it lacks features found in other CAD programs and viceversa.
  6. You can try this script: PROCEDURE HideObjClass; VAR pX,pY: REAL; objHdl: HANDLE; objClass: STRING; BEGIN GetPt(pX,pY); objHdl:= PickObject(pX,pY); IF objHdl <> NIL THEN BEGIN objClass:= GetClass(objHdl); HideClass(objClass); END; END; Run(HideObjClass); The script can be added to a palette and activated by double clicking the script in the palette. An alternate method is to create a tool script that you add to the workspace. And the code will be almost the same. PROCEDURE HideObjClass; VAR pX,pY: REAL; objHdl: HANDLE; objClass: STRING; BEGIN GetMouse(pX,pY); objHdl:= PickObject(pX,pY); IF objHdl <> NIL THEN BEGIN objClass:= GetClass(objHdl); HideClass(objClass); END; END; Run(HideObjClass);
  7. As a plugin programmer, one can control what is presented to the user in the OIP. In recent plugins, I have added this functionality where I only show the first X number of parameters and the rest are hidden and used only internally or to hold data for other plugins. This may be the case with NNA plugins where they only show what they want you to modify and the rest of the parameters are hidden (i.e. not included when adding parameters to the OIP).
  8. Look at the article: http://developer.vectorworks.net/index.php?title=VS:Parametric_Custom_Shape_Pane apparently, the functionality is available in VW2009 (could not verify since I have VW2008) Also as an alternative to using text files, which requires more coding to implement, explore using String Data in the script editor. If the data will not change over the years, then this will be an easier solution.
  9. It has happened to me only when opening older files and the plugins in the file have been updated. I would get the name of the plugin but none of the parameters. Usually, when updating plugins, I can change one of the parameters and the plugin object will get updated in the file.
  10. If you want the layers and associated views to be consistent, I would suggest that you also substitute the text entry with a popup that gives the user only available choices. Otherwise you are going to end up with files with different names (i.e. 1st Floor, floor 1, first flr, etc.) for the same type of layer.
  11. Command plugins will be under the Menus tab while the tool and object plugins will be under the Tools tab
  12. You can also draw objects and export the file as vectorscript. For the most part the script is accurate with a few exceptions. Complex 3D objects, including nurbs, do not always import back the same as they were drawn but it can be a starting point for further developing.
  13. It will work having separate files but do you really need to? A common problem I have with this type of setup (Acad and Microstation) is that people forget to send all referenced files or they send outdated files and it becomes a mess if this happens. In my experience it is better to keep as much of a project in a single file and use layers for the different design parts which is one of the advantages of VW over other CAD programs.
  14. Make sure your items start at number 4. 1-3 are reserved for the OK, Cancel, and Help items. I do not know what you mean by the "choice is not stored". Can you elaborate on this?
  15. With the SDK you can access any OS function since the programming environment is Visual C++ for Windows.
  16. David, Try implementing the code as a tool plugin instead of a menu. This way it will execute the script and renumber every time you click on an object. The tool will be active until you select another tool.
  17. First, I would add the handle array number to x,y so you know which set corresponds to the handle such as : x,y,handle array number 523.45, 678.90, 1 234.56, 987.65, 2 523.45, 123.45, 3 Use the function PROCEDURE SortArray(VAR arraytosort :ARRAY; numtosort :INTEGER; fieldnumber :INTEGER); Although it says it will sort 1 dimensional arrays, I have used it with a 2-dimensional and it will sort the first element. After this the array would look like this: x,y,handle array number 234.56, 987.65, 2 523.45, 678.90, 1 523.45, 123.45, 3 To reorder the y element you need to find the smaller value and swap it so it becomes the first element. You go down the list and find the second smallest, swap it, and so forth. The final result then should look like this x,y,handle array number 234.56, 987.65, 2 523.45, 123.45, 3 523.45, 678.90, 1 If you search google for "array sorting", you will find several code samples. This is one link you may try http://www.cs.mtu.edu/~shene/COURSES/cs201/NOTES/chap08/sorting.html
  18. I developed plugins that try to model the roads as much as possible. Road plugins are similar to the ones included in VW but are more detailed and hold all the information for profiles and sections. Everything is tied to the center line stationing so if I want the cross section at a particular station, the section plugin gathers information from the DTM, road segment, pipes, etc. and draws each for the requested station. Since property lines are not always linear and/or parallel to the center line, I use survey point plugins, which can calculate the DTM elevation, as placeholders for the left and right property line profiles. I also use custom notation plugins for the profiles and sections. When I place a notation on the profile, it calculates the station and elevation so if the note needs this information, the plugin can include it as part of the text.
  19. And how would you know that it is more productive if you do not even know my workflow? I can produce PS&E in a fraction of the time than consultants in this area using Microstation or AutoCad. By the way, Microstation is the standard civil engineering CAD for most state DOT's so using HighRoad in the USA would be out of the question. Not being produced locally might be a problem also for most users if it could not be easily customized. As an example, I have to produce consent forms for property owners whose driveways will need to be reconstructed outside the public right of way. Doing each manually will take about half an hour to compose and draw all property information, profile, and elevations. A regular project will have about 30 affected driveways so it would take about 2 to 3 days to do all the forms. Now, I can do them all in a minute with a script. But back to the GE question. If VW has support for KML files, what is the problem with taking 3 steps instead of 1 to view in GE? It is not like you do this function constantly to make a difference.
  20. I know it is not a transition from Pascal to C++ because that was done a long time ago when Apple also switched to C++. Scripts use Pascal as the cross platform programming language for simple tools but if you want to create your own interfaces and/or access the OS, you need to use the C++ SDK for each platform. This arrangement holds true for Microstation, which uses Basic for scripting and C (MDL) for more complex programming. I suspect AutoCad is the same, which uses Lisp for scripting. I believe also it might be a video card problem because my 2 year old laptop will crash when I use OpenGL in VW 11 and 2008. I just bought a desktop with 6GB RAM and newer video card and have not experienced any problems.
  21. Bruce, How wrong are you on this. You just do not know or have not bother to explore the full potential of the program. Plugins are indeed dynamic objects which may change in response to user input. If I change the grade or any other parameter of the road through the OIP, I made it smart enough to search for all other plugins (profiles, sections, etc.) that may be affected and to change them accordingly. I use my road section plugin while establishing road grades to ensure that driveways meet the maximum 14% grade and also to avoid the use of retaining walls due to the proposed road cuts. I also use the section to observe the cross grade, which should be 2% to 4%, when I change the elevations or grade on the road plugin. The estimate for asphalt, base, curb, and sidewalk gets updated every time I change any OIP parameter. So you see, dynamic design can be accomplished with VW. You just need a better understanding of the program and some imagination to fully exploit the capabilities of VW. It also helps to be a long time user which in my case, I have used it since around 1985 (MiniCad 1).
  22. I do not need another program to do 3D and road design when I can do it all within VW. The plugins I use are 2D/3D objects that model the road, curbs, sidewalks, driveways, drainage, utilities, etc. in 3D. The road objects also hold the information needed to draw profiles and sections automatically. I have used other programs and researched HighRoad (from Australia if I am not mistaken-Ugh!) but none can produce exactly what I need. Sometimes the learning curve is so steep that I rather use the time to create the tools that I need. This is just a matter of scales. Sure you can display a road segment without a problem but if you start adding more segments, it gets to a point where a personal computer cannot handle all the data. I have made the mistake of loading the parcel shape file in Arcview without configuring the zoom limits to display the data and this takes a while to load. These are just polygons so can you imagine how long it would take to display detailed 3D objects? You also need to consider that the internet is not as fast as a hard drive so getting the data will delay the display time even more. I am in agreement that this would be beneficial for some folks but you also have to be realistic. You may be able to display one detailed 3D building or road segment at a time but not one square mile of the real world.
  23. I am with you Petri but I will buy a Fiat. Not only would it be time consuming and expensive to model everything in 3D but you would also need a supercomputer to show a street network without slowing down to a crawl. On the positive side, if the design could be modeled, conflicts between different structures could be identified earlier in the design stage rather than later during construction. Those change orders can be very expensive also.
  24. This is the idea behind plugin objects where the graphics will change based on the user preferences or choices. You can add a popup parameter/field with the two choices and the script will change the look of the circuit based on the selection. At the same time you can also update the id numbers assigned to the circuits.
  25. Since I do not have the VW architect, I do not know what parameters are in the window and door plugins. But if you need to know about their location within the wall, you can get this information by iterating through the 3D polys that make up the wall. The plugin should have a 2D group and a 3D group.
×
×
  • Create New...