Jump to content

Miguel Barrera

Member
  • Posts

    663
  • Joined

  • Last visited

Everything posted by Miguel Barrera

  1. Use DelObject(objHdl: HANDLE) to remove the locus VAR locHdl: HANDLE; .... BEGIN .... .... Locus(0, 0); locHdl:= LNewObj; FlipHor; DelObject(locHdl); END;
  2. I too believe you have VW 2008 without any service pack. VW 12 was the last version with the consecutive numbering and VW 2008 was the first to be named after the year it was released so in reality it is version 13 of the program. Likewise the current VW 2013 should be version 18 of the program.
  3. Saved views does the same thing that is shown on the thread except that you do not see the group of design layers making the view. It is unlikely that there would be the same number of views as design layers because each view will have a group of layers. The advantage of saved views over your scheme is that design layers can be added to different views multiple times as needed while the foldable view follows a strict hierarchy. The only thing needed on the saved view list is to show the layers that are included in each view
  4. It can be done in the reset event with SetParameterVisibility(inPlugin: HANDLE; inParameterName: STRING; inSetVisible: BOOLEAN); but SetObjPropVS(12,TRUE) should not be included or set to FALSE; Otherwise by setting it to TRUE, the widget visibility must be handled in the event 41 (kObjOnWidgetPrep). If you are not changing any popup values in code, which are also handled in event 41, then doing it during the reset event works best.
  5. Install a pdf virtual printer. I use CutePDF Writer but there are others that are free. This utility works as a printer and it will be included in the list of printers available. After installing, select the pdf printer in the Page Setup and set the print options such as sheet size, landscape, etc. When you are ready to create the pdf, just click on print and the pdf printer should already be selected as the output device. This method will work in any application that has the print function. CutePDF website
  6. PROCEDURE Wall(p1X,p1Y,p2X,p2Y:REAL); If you want it to appear with specific attributes, create a wall in an empty document and change it as you wish. Then export the file as Vectorscript and when you open the file look for the object creation code where you will find all the related wall code.
  7. Yes, to make the center of the rect the insertion point which is always at (0,0) of the plug-in coordinate system. It is the same way as symbols behave. I think the easiest way would be to draw first the object(s) as a group and then move the group relative to the origin at (0,0)
  8. If your preference is to always have text unfilled, I would hard coded with SetFPat(objHdl:HANDLE; fillPattern:LONGINT); where fillPattern = 0 I always assign by class but if I want an object to look somewhat different I hard code the attribute after the object is created.
  9. You are making it more omplicated than it should. You are already half way there with the path object but asking for information from the user with a dialog when it can be entered in the OIP. Besides the dialog will show up every time the object is regenerated. To make the code cleaner I would add a third hidden parameter to hold the full name as in: fullName:= Concat(RuimteNummer,':',RuimteNaam); SetRField(ObjHd,ObjName,'__HiddenField',fullName); To find the symbols in space '301:Room Name' on a separate script: PROCEDURE FindSyms; VAR spaceHdl,polyHdl: HANDLE; PROCEDURE GetSpace(objHdl: HANDLE); BEGIN spaceHdl:= objHdl; END; PROCEDURE GetSyms(symHdl: HANDLE); VAR symPt: POINT; BEGIN GetSymLoc(symHdl,symPt.x,symPt.y); IF PtInPoly(symPt.x,symPt.y,polyHdl) THEN BEGIN { Process the symbol inside the space pio further } ......... ......... END; END; BEGIN ForEachObject(GetSpace,(('Pio Name'.'__HiddenField'='301:Room Name'))); IF spaceHdl <> NIL THEN BEGIN polyHdl:= GetCustomObjectPath(spaceHdl); {This will get all symbols but it can be modified to limit only the ones in the active layer } ForEachObject(GetSyms,((T=SYMBOL))); END; END; This code could also be triggered by a button parameter in the OIP if desired.
  10. PushAttrs; {To save attributes settings} {These will set attributes by class} FPatByClass; FillColorByClass; LSByClass; PenColorByClass; MarkerByClass; OpacityByClass; {Sets the active class for object creation} NameClass('Name of Class'); ...... {Drawing code} ...... PopAttrs; {To restore attributes}
  11. But it does not have to be that way. For example in my line of work, I created traffic signal pole objects that have devices, such as signal heads, detectors,etc., mounted on the mast arm. If I move or rotate the pole, all the devices attached will move with the pole. If I add more devices to the pole, the device sends a message to the conduits to update its wire count and change its size if the count exceeds the limit. Such enhancements can be applied to the architectural side also but the problem with any app is that you have programmers that may not know in great detail what the user wants. On the other hand, you have architects that want some feature or have great ideas to make the app better but lack the knowledge to customize it to their liking so the only alternative is to wish list it or complain. BTW, more than half of the plugins are scripted.
  12. LOL.... I believe you are out of line to suggest that only artists will have any use for the program. As a Professional Engineer, the program has provided me the ability to complete REAL projects in a third of the time with better graphic presentation than my counterparts who all are using ACad or MS. The secret is to fully understand what the program is capable of doing and when a desired task is not included, create your own. If a stock column is not intelligent enough to communicate to other columns that they should move also, then you create a custom one that will behave as you wish. I cannot imagine someone actually moving each piece by hand. You can even go further and have the column calculate its own forces and moments and check if the size and reinforcing is adequate. The program provides the tools to automate such tasks and all you need is some creativity to make the program work the way you want. Most complaints I read are due to users not understanding the tools provided or trying to work the same way they did with Acad or MS. By no means do I think the program is perfect, otherwise I would not be creating my own tools, but which program is? No program to date has ever satisfied all the user base 100%.
  13. 1. Get the location point of the symbol 2. Use PtInPoly (assuming the space pio is a poly), which will return true if it is within the space boundaries.
  14. Sorry if I misinterpreted your wish. It must be my american dialect. Does "get rid of" have a different meaning on the other side of the pond?
  15. Why do you want to get rid of them? It is possible to build a model and generate plans from it. The original concept was to create your 2D plans at the same time you are building a 3D model (HYBRID) and this does not apply exclusively to architecture. So reversing the order from 3D to 2D could be programmed without removing the design layers. I hope you realize that your wish for removing design layers may never happen since other users, including myself, depend on the current concept to design other types of projects. I say it is possible because I have programmed hybrid road plugins that can make live updates to profiles & sections. In the same way, you could program VW to generate plans & sections if the cutting plane is defined.
  16. You can check for a decimal point with: IF Pos('.',strVal) = 0 THEN strVal:= Concat(strVal,'.00');
  17. First, you are in the SDK C++ section and cannot use that function in VS. BTW, the parameter is a point with x,y,z values. You should be using HScale2D instead but have not tried it on a symbol. In the past, symbols could not be scaled in VS but maybe that has changed with the latest VW versions that allow scaling.
  18. When you change the class, it only changes the pio itself, the container, but not the objects contained within. This behavior is the same as in symbols, where the symbol can belong to a different class from the objects it contains. You need to get the name of the pio class and then set it as the active class so that all the objects drawn within the pio are created under the same class. I use this flexibility to hide or change the appearance of the objects. I usually create the pio with a class for a group of related pio's (i.e. furniture,signals,etc) so that the whole group can be hidden in certain views. The objects within are created in other classes to show different states as in existing, proposed, removed, salvaged, etc.
  19. As far as I know, I do not think you can call external compiled libraries (*.dll). VS is confined to the procedures/functions defined in the compiler and ported from C++. Why not build VS libraries of these basic functions and add them when needed with the {INCLUDE} directive?
  20. By holding the name in a record field has the same effect as naming the object directly because it is contained within the pio. But if not desired then: 1. What are you trying to achieve by naming the object? 2. Where are you going to use the name?
  21. The simplest way is to add a parameter to name it. Since the parameter is a field in the pio record, you can use the field value criteria to use in worksheets, etc.
  22. Have you tried: PROCEDURE SetPolyClosed(polyHandle:HANDLE; isClosed:BOOLEAN); PROCEDURE Example; VAR h :HANDLE; BEGIN h := FSActLayer; SetPolyClosed(h, (NOT IsPolyClosed(h))); END; RUN(Example);
  23. You probably want to emulate the AutoCad environment but in VW you link line weights with colors and other attributes by creating classes and assigning these to objects. The tool used in your last job probably was simply the class list or the attribute palette, which is part of the VW workflow and has been since the beginning, I think.
  24. In a nutshell: { obtain a handle to the path polygon of the object } gPathHdl:= GetCustomObjectPath(gObjHdl); {Get polyline data} vtxTot:= GetVertNum(gPathHdl); ALLOCATE gPlineList[1..vtxTot]; FOR i:= 1 TO vtxTot DO BEGIN GetPolylineVertex(gPathHdl, i, gPlineList.ptX, gPlineList.ptY, gPlineList.vtx, gPlineList.rad); gPlineList.vis:= GetVertexVisibility(gPathHdl,i-1); END; ..... ..... DrawPolyline;
  25. Get the path object, which will be a polygon, fromm the pio and create the polygon/polyline from the path vertex data returned. Note that the reason for having an empty object is that the path can be something other than just a polygon (i.e. an extrude along a path by adding a profile to the pio).
×
×
  • Create New...