Jump to content

Miguel Barrera

Member
  • Posts

    663
  • Joined

  • Last visited

Everything posted by Miguel Barrera

  1. BEGIN resultStatus:= GetCustomObjectInfo(objName,objHd,recHd,wallHd); IF resultStatus THEN BEGIN sp_width:= PSPACE_WIDTH; ... ... sp_width:= 5 * sp_width; ... ... SetRField(objHd,GetName(recHd),?Space Width?, Num2StrF(sp_width)); END; END; For clarification, the parameter name passed to SetRField must be the same as the one defined in the paramater list. You can access these from the pull down menu in the VS editor under "Parameters...". If the parameter name is 'Space Width', then it must include the space in SetRField but the "constant" to access the value will always need an underscore instead of a space as in PSPACE_WIDTH. Personally, I name parameters with spaces in order to set them apart from variable names which cannot have spaces. Tip note: the record name is the same as the pio name, so you can simplify your call as: SetRField(objHd,objName,?Space Width?, Num2StrF(sp_width)); Also from experience, I do not embed functions within other procedures because you do not know the value returned by the function when debugging. This is specially important if the returned value is a NIL handle which in most cases it will crash the program.
  2. 32k seems kind of small for that to be a problem. Even in VW 9, scripts that I wrote were over 100k. I have reach a limit at over 250k where I would write some code, save it, open it again, and the new code would be lost.
  3. Now let us not be to harsh on VS and PIO technology. This is a very powerful tool to accomplish almost anything within VW. It may be old to some of you because we have had it for some time but to this day, you will not find PIOs in AutoCad or Microstation. "Dynamic Blocks" might be a boom for the non-programmer but falls very short to what VS can do. The "Dynamic" part refers only to the ability to resize, stretch, rotate, etc. (actions) for selected geometry (parameters) from defined points (equivalent to control points in the PIO) or setting sizes according to user input (in PIO is a pull-down menu in the OI palette). VS can do more than just change geometry. Imagine that as you add electrical components (PIOs) to a building, the load requirements for the system are calculated and the part and wiring are added to the estimate; or as you add heads to a sprinkler system, it calculates the water pressure at every conduit junction; or as you add sheets to your project a sheet index PIO gets updated with the push of a button. All these scenarios could be done with VS. What you really want is a visual interface to program simple tasks which would be in addition to VS and the SDK. AutoLisp (AutoCad) and Basic (Microstation) are the equivalent to VectorScript. As far as the language is concerned, Pascal was used because it was the language of choice at the time scripting was added to VW (MiniCad). Any Mac programmer in the mid to late 80's would have to know Pascal because the OS as well as most applications including MiniCad were programmed in this language. And going back to the original request, I can understand why NNA would protect their intellectual property by locking their PIO's. To me, that is like asking the for-profit software companies to publish their code and if so, what would be the incentive for them to produce good applications? Open source is not going to work if you are trying to make a profit. I do agree with the second part of your request which asks for better documentation including examples for each procedure and function call so you can understand the context in which they are used.
  4. Detailed estimates are doable within VW if you formulate a system to measure standard bid items. The system will require the classification of materials and perhaps the creation of custom pio's with measured fields. I have done public works projects and always used VW worksheets for estimating quantities. The advantage of doing the estimate within VW is that with any change to the plans, the worksheet can be updated with the push of a button. I also review plans from Consultants and most of the time, estimates, which are done outside the CAD program, are not accurately updated with each revision and would require a complete manual measurement. This is often reflected in the number of change orders needed to make-up for missed quantities.
  5. Have you tried File->Export->Export Vectorscript? Otherwise I do not understand what are you tryng to do. I did write sometime ago a routine in Basic to export shape files from Arcview as vectorscript and import it into VW.
  6. The only way is to create symbols for each size or make your own custom PIO. There is also WinDoor from Julian Carr as an alternative to the VW plug-ins.
  7. Are the easting and northing planar or radial(degrees) coordinates? If planar coordinates, they should be equivalent to the x (=Easting) and y (=Northing). If the points do not match, they may need to be rotated. If radial, you would need to translate the latitude and longitude (degree coordinates) to plane coordinates based on local criteria. This is typically done by GIS software. If you have the shape (.shp) and the projection (.prj) file for the points, you can import the shape file into VW and it will convert the points to plane coordinates.
  8. What are you trying to accomplish? GIS has 4 basic elements: 1. The shapes or geometric objects (points,lines,or polygons). 2. A database attached to each shape. 3. A class or attributes to assign for each database query. 4. The database queries to classify the shapes. You can do all of these steps manually with VW but of course it will take some time to set all this up. If the data changes you would need to go through the steps again With scripting you can automate these steps and shorten the time considerably. If the data changes you only have to run the script again which is what GIS does.
  9. A PIO cannot get events from other objects. Only certain events within the PIO can be called. Rather than renaming directly, you can write a script that will rename the SL and also update the affected PIOs
  10. By mouse click: FUNCTION PickObject(pX,pY:REAL): HANDLE; PROCEDURE ForEachObjectAtPoint(actionFunc:PROCEDURE; objOptions:INTEGER; travOptions:INTEGER; locX,locY:REAL; pickRadius:REAL); By name: FUNCTION GetObject(name:STRING): HANDLE;
  11. Change the function definition to: FUNCTION SelectProfile2ExtrudeAndRepeat(Profile: HANDLE; ProfileRepeats: REAL): HANDLE; VAR hTemp1,hTemp2: HANDLE; BEGIN; hTemp1:= hExtrude(Profile,0,100); hTemp2:= hDuplicate(hTemp1, ProfileRepeats,0); SelectProfile2ExtrudeAndRepeat:= hTemp1; { or for the duplicate handle: SelectProfile2ExtrudeAndRepeat:= hTemp2; } END;
  12. or object opacity in the Attibutes palette. Also, 100% opacity = 0% transparency = solid. and you probably mean it looks "like they now have 50% opacity."
  13. You should probably test if the handle passed to hDuplicate is not NIL. Something like: IF DrawShapeGiveHandle(objHdl,RealTemp) THEN hTemp:=hDuplicate(objHdl,RealTemp,0);
  14. But VW can also handle other record data and construct queries just as Arcview. With a little programming, you can run scripts to render a map based on queries of the attributes attached to each shape. As a tool to illustrate maps, there is not much difference between them and my experience tells me that many people believe that the main purpose of GIS apps is to draw maps. The advantage of having Arcview is that it can also serve maps over a network or the internet and any user can view and make queries of these maps.
  15. Keep in mind that the tools I developed date back to VW 9 when there was no viewports. I used the "3D Triangles" display style for the sole purpose of calculating the z value at any point in the DTM, which at the time was a 2D/3D symbol. As you may guess, I use custom plug-ins rather than VW section viewports for the street profiles and cross sections that are based on centerline stations. Nowadays, it really does not matter what display settings I use because I can get the z value from the VS function DTM6_GetZatXY.
  16. By dimension style, do you mean a custom dimension standard other than Arch,ASME,ISO,etc? If custom, there are two options at the bottom of the edit custom dimension dialog. One for Linear Markers and another for Other Markers. On the pulldown menu for the markers, you can choose a predefined marker style or define your own custom marker.
  17. How do they get the Z values into the text objects? If manually, you could save a lot of money by asking for the text file only. Most survey equipment software can export the data to a text file. But let's assume that you get this 2D file with the Z data in text objects. You could just create a script that searchess all text objects and assigns the z values to the 3D locus or stake objects without user interaction. As I mentioned before, I do not use the VW stake objects. I import the data into my own objects and then with a script, I create 3D Locus with the x,y,z values for each point in another layer. To force the DTM to draw straight lines between curb points, I add the 3D polygons. So to answer your question, the trick is to provide both the 3D points and the 3D polygons to create the DTM. The use of a "feature line" has nothing to do with the version since I was doing this back with VW 11. I will try to cleanup one of the street reconstructions with just the DTM and 3D data because most of them are fairly large as complete projects.
  18. I do not know if I missed something but it seems a bit more complicated than it should be. In my workflow, I would ask the surveyor for a text file with the coordinates and other attributes for each point. They should be able to provide this information because how else would they get the points into Microstation. Then use the import survey to create the stake objects and finally, create the DTM. However, I do find the VW tools very limiting and had to develop my own which add the features needed for my line of work. Nevertheless, the general workflow remains the same. There may also be some adjustments required to the resulting DTM in order to render a more precise model. I design roads and the DTM cannot model the 7 inch drop at the curb line with just 3D points. I accomplish this by adding 3D polylines for the curb line to the DTM.
  19. By the way, according to the definition of PtInPoly, all points within or on the polygon will return true. My understanding is that "on the polygon" means on a line segment of the polygon.
  20. Yes, I know a way but involves a bit more work. You can use: PROCEDURE LineLineIntersection( l1start :POINT; l1end :POINT; l2start :POINT; l2end :POINT; VAR parallel :BOOLEAN; VAR intOnLines:BOOLEAN; VAR sectpt :POINT); line1 is the segment between two vertices of the polygon. line2 is a line perpendicular to the segment passing through the point in question. intOnlines will return true if the intersecting point is on the polygon line segment. Or you can test for distance with the resulting sectpt if within a tolerance factor. Before this procedure was added, I calculated the distance from the intersecting point to each end of the line segment. If the sum of the 2 distances equaled the length of the line segment then the point was on the line.
  21. FUNCTION PtInPoly(pX,pY: REAL; h: HANDLE): BOOLEAN;
  22. Why do you need to mirror the callout? The reason you may be having problems is because it was not intended to be mirrored. The vertical and horizontal position parameters should be used for the text alignment.
  23. To answer your question about editing NNA plug-ins, all of these are locked and the only thing that can be changed are the defaults for the parameters in the OIP and adding your own parameters. As you probably figured it out, the default text attributes for this plug-in are the current document text attributes and you can change the attributes through the text menu as if it was just a text object.
  24. I just realized that the default font does not help in showing the two single vs double quotes. So here it is again: [font:Courier New] Expanding on Pat's observations, these are my 2 cents which are based on a working script. MyCriteria:= Concat('=DATABASE((''TestRecord''.''FieldA''=', FL, '))'); SetWSCellFormula(WSH,SN,0,SN,0,MyCriteria); You do not need 'R IN [''TestRecord'']' because the second argument implies FieldA is in TestRecord. Make sure you type 2 single quotes '' and not just a double quote " [/font]
  25. Expanding on Pat's observations, these are my 2 cents which are based on a working script. MyCriteria:= Concat('=DATABASE((''TestRecord''.''FieldA''=', FL, '))'); SetWSCellFormula(WSH,SN,0,SN,0,MyCriteria); You do not need 'R IN [''TestRecord'']' because the second argument implies FieldA is in TestRecord. Make sure you type 2 single quotes '' and not just a double quote "
×
×
  • Create New...