Jump to content

Miguel Barrera

Member
  • Posts

    663
  • Joined

  • Last visited

Everything posted by Miguel Barrera

  1. Why would you even have this in a plugin object? It is more suitable for a command or tool script.
  2. By updating the viewport manually it gives you a chance to change several objects in the viewport before making one update. If a VP takes some time to render, you would not like it if you had to wait for each change to render. But an "auto-update viewport" could be a VW preference.
  3. The dialog after the delete is almost a programming requirement to make sure it was not selected by mistake. This is done on any software when you are deleting something or to confirm an action that may have drastic results and the user may not be aware he is changing the document. When a menu item has the dots it means that you need to select some settings in a dialog before completing the command which is different from the scenario above.
  4. If you are getting arrows every time you create lines, then you probably have your default attribute settings with the marker toggle ON. You really do not need a None choice if you can just toggle the marker at each end OFF or ON. If you have a lot of lines with the marker on, do a "custom selection" with line and marker style as the criteria. Once selected, toggle the marker(s) OFF in the attributes palette.
  5. An alternative is to add a static text widget to the parameter list in the plugin setup event by using: FUNCTION vsoAppendWidget(widgetType:LONGINT; mappingID:LONGINT; text:STRING; data:LONGINT): BOOLEAN; widget types: kFieldLongInt = 1; kFieldBoolean = 2; kFieldReal = 3; kFieldText = 4; kFieldCalculation = 5; kFieldHandle = 6; kFieldCoordDisp = 7; {dimension} kFieldPopUp = 8; kFieldRadio = 9; kFieldCoordLocX = 10; kFieldCoordLocY = 11; kWidgetButton = 12; kWidgetStaticText = 13; and the last one is what you would use to display information
  6. VW is a what you see is what you get (WYSIWYG) program. To grey out the drawing, you need to set the layers to grayscale before exporting or printing. If you are going to switch between the two modes often then save the layer settings as views; one for design and one for printing/exporting.
  7. I noticed in another post that you have Landmark. Then you should be able to use the menu command "Import Survey" which reads points from a text file and converts the data to 3D points or Stake objects in VW.
  8. You need to add a Control Point parameter to the plugin definition. By default they are named in concecutive order so the first one will be named "ControlPoint01". You can get the x & y location either by calling the constants PCONTROLPOINTO1X & PCONTROLPOINT01Y or through the GetRField procedure with 'ControlPoint01X' & 'ControlPoint01Y' as the field names. As with any other parameter, the x & y values will be visible in the Object Info Palette (OIP) and to hide it you will need to set the parameter visibility to FALSE.
  9. And if you have more than 9 sheets, you probably need to prefix the first ones as 01,02,...09 since the sheets are displayed in alphabetical order
  10. You most likely have the foreground and background set to black as the default so anything that is created will have these attributes. Normally the background color would be white or other light color. In the attributes palette you have the pattern on the left and next to it two rectangles where the upper left is the foreground and the lower right is the background color. Click on this last one, choose a light color, and then you will see the pattern selected.
  11. Remember that the founders of Apple, Microsoft, Google, Facebook, etc. were all $10 scripters working out of a garage or college dorm. Innovative ideas do not always come from the big blue companies. Your reference to maplesoft, which seems to be what I knew as MathLab, is nothing new. They have packaged what you learn in math and physics classes in a format where you just plug in data and you get a numeric or graphical result. Knowing the math does not mean it will be an instant success in the AEC world. Maple is being marketed as an add-on to those CAD programs and conceptually is no different than adding a Software Development Kit (SDK) to a programming project (or $10 script). For example, you may not know anything about how quicktime works internally but if you add the Quicktime SDK to a program, you could open and view movies in an app. I created WallFramer with the thought of modeling all the pieces that go into building structures and generating an accurate list of materials. Fast forward 15 years and these ideas are part of the BIM concept. With VW plug-in technology, it would be feasible to create dynamic structural elements that can be sized to the current loading or resized if the loading changes, perform a seismic analyis, or calculate energy requirements, etc. The point is that you do not need to be a rocket scientist to develop and idea and create good software.
  12. As far as I know you cannot disable it by a function call. However, you can prevent the move3Dobj procedure from executing in the script. If the currently executing pio is part of the list then exclude it from the procedure: IF objhd <> curPioHd THEN move3Dobj(objhd); You can further perform selective execution by sending messages to other pio before moving or resetting them. For example, only those receiving a 'move' message will be included in the move3Dobj procedure.
  13. This thread may be helpful Uniclass template Another way of doing this would be with a script to transfer the names in excel (csv format) to VW classes.
  14. You need to call PROCEDURE SetActSymbol(name: STRING); before to set the symbol as active SetActSymbol('SymbolName'); H:=FInSymDef(ActSymDef); WHILE (H <> NIL) DO BEGIN ............ ............ H:=NextObj(H); END;
  15. If you want to display dms in the OIP you need to change the angle precision to dms in the Document Settings -> Units dialog. This is a global change for the document so anywhere there is an angle it will display as dms.
  16. It means that those objects not getting the changes have a line thickness other than the class thickness. You need to select all the class objects and select "Class Thickness" in the attributes palette. As a rule, I always have the class atributes selected in the palette when nothing is selected which ensures all new objects will have the class attributes. If I need to change them to another class afterwards, all the selected objects will get the new class attributes when changed to another class in the object info palette.
  17. Is this something you want to do as part of a script? If so, it will be: SetUnits(0, 3, 0, 1/12, 'ft', 'sq ft'); To change the unit mark to "ft" in VW directly: 1. Select the feet units to populate the custom dialog 2. Select custom units and click on the button next to the popup 3. Change the unit mark to ft, select Larger from Smaller (12 inches per Unit), and click OK
  18. The unit mark is defined under the "name" variable in the SetUnits definition: PROCEDURE SetUnits(fraction:LONGINT; display:LONGINT; format:INTEGER; upi:REAL; name:STRING; squareName:STRING); It is usually defined as 2 single quotes and because it is a string it has to be enclosed by a pair of single quotes so you will see 4 single quotes together as in , ' ' ' ' , (without any spaces).
  19. Ron, VW needs the projection information to correctly translate & export the file into gis with latitude & longitude degree units. The catch is that it will only use the projection if the VW file already has this information. First you will need to import a gis file with the projection file (*.prj) in the same folder as the shapefile; then draw the new geometry; and finally, export the file back as shapefile(s)
  20. I also do not think you can disable it however, you can minimize the amount of code that is processed by making a conditional statement and executing only the code that is needed for the task. I have developed event enabled objects which do different things depending on the parameter change. If a pole object is moved, it resets other objects attached so they move also, updates the conduit runs and wiring lengths. If I change the type parameter, then only the geometry changes, and so on. Although I have done this since VW11 by storing previous paramaters and comparing them to current values, you now have a mechanism called state notifications which do the same job. You can read more about these notifications at VS state notifications
  21. 1) What do you mean by Point Tool? a Point Plugin Object(PIO)? If so, it takes more code to make it work and if you are trying to draw a line then a Line PIO will be best suited for the task. PIO's are used to change an object property as you change a field in the pio record, when you move, or you rotate the object. 2) In a tool, I removed GetMouse & GetPtL and replaced it with GetLine(x1,y1,x2,y2); Snaps and constrains worked OK.
  22. Brian, It is a legitimate class action lawsuit for which I have made a claim already for an HP laptop. The notice was sent to me because I had already sent the computer to HP for repairs on the wireless network device back in 2008. In summary, you can get a reimbursement to repair it or a replacement computer. If you own an Apple or Dell, you can claim either one but if you own an HP, you can only claim a replacement computer because these laptops cannot be repaired.
  23. If you are converting your script into a tool, you do not need the while statement. A tool will still be selected when the script finishes executing and will start again when you click on the drawing. Instead of using GetPt which waits for another click besides the tool trigger use GetMouse as your first statement and then GetPtL immediately after.
  24. You can use: Message('hd = nil'); and/or SysBeep; as in IF hd = NIL THEN Message('hd = nil') ELSE BEGIN .... END; This is also a method used to debug a script.
  25. 1. Copy the workspace(*.vwx) in the Workspaces folder from one computer to the other 2. Copy the tools from the Plug-ins folder also Both user modified "hidden" folders should be at: Username\AppData\Roaming\Nemetschek\Vectorworks\2011\ These files are cross platform so it should not be a problem to do the same from Windows to Mac and viceversa.
×
×
  • Create New...