Jump to content

Pat Stanford

Moderator
  • Posts

    12,675
  • Joined

  • Last visited

Everything posted by Pat Stanford

  1. rocitop, Close, but no cigar;-) It is not an ObjectVariable. The light is a Plug-In Object (PIO). That means that there are a number of parameters (variables) that can be set through the Object Info Palette (OIP). The parameters are stored in a Record. In order to change the parameters, you neet to use SetRField to set them (or GetRField to read them). For a light object, you need to use SetRField(OH,'Lighting Device','Draw Beam', 'T'); OH is a handle to the object. 'Lighting Device' is the name of the record (usually the same as the name of the PIO, but not if it has been localized). 'Draw Beam' is the name of the field (again watch out for localization.) Finally, SetRField always take a string as the final parameter. Since Draw Beam is a boolean, you must use 'T' to turn it on or 'F' to turn it off. To check for the record and field names to use, lookup the parameters of the object in the VectorScript Plug-In Editor. Check out the VectorScript Guide on Plug-Ins and Fields and Records for more information. Pat
  2. Lady Jane, By any chance do you have a lot of Locus Points in your drawings? There is an option in the VectorWorks Preferences:Edit pane called "Snap to Loci." If this is selected, then you get horizontal and vertical extensino lines running from every locus point. If you had this off in VW10 and it is on by default in VW2008, it might explainf what you are seeing. Pat
  3. Take a look at the Wall Join Tool. For the wall at 8', use the Tee Join mode. For the wall at 12', use the El Join mode. Pat
  4. Emmanuel, How many polygons are there in your file? When you say you would like it to extrude a few at a time, do you have any idea how many you are thinking of? Also, What do you mean by openGL not being able to render? Is it just taking a long time, or is VW actually crashing? Let me know and I will see if I can find some time to revise the script. Merry Christmas, Pat
  5. In VW2008 (and I think in VW12, when you get to the New Design Layer dialog box, check out the bottom. There is a section called Creation Options. You can set both the view and Viewport visibility of new layers. I think that is what you are looking for. Pat
  6. If you hace multiple objects selected and use the scale tools, they all scale around a single point and the group gets bigger. Often, you want each object to scale around its own center. That is what this script does. Use as you see fit, but at your own risk. Please credit me if you use this. Pat ============ Procedure ScaleEachObject; {Scales each selected object in the active layer around the obejct center} {? 2007, Coviana, Inc - Pat Stanford pat@coviana.com} {Licensed unde the GNU Lesser General Public License} Var H1,H2:Handle; N1,N2:Integer; A1:Dynarray[ ] of handle; R1:Real; Begin N1:=Count(Sel); If N1>0 then Begin Allocate A1[1..N1]; N2:=1; While N2<=N1 do Begin A1[N2]:=FSActLayer; SetDSelect(FSActLayer); N2:=N2+1; End; R1:=RealDialog('Enter the amount to scale each object by','2.0'); N2:=1; While N2<=N1 do Begin SetSelect(A1[N2]); Scale(R1,R1); DSelectAll; N2:=N2+1; End; End else AlrtDialog('At least one object must be selected'); End; Run(ScaleEachObject); ============
  7. This script checkes each 2D Polygon on the active layer to see if there is exactly one 3D locus point within its boundaries. If there is exactly 1 loci, then a duplicate of the polygon is made and extruded. The original polygon and the locus point are deleted. At the end of the script all of the remaining polygons and locus points are selected. I origianlly tried to use ForEveryObject to do this, but it seemed that the handle to the new Extrude was somehow getting placed into the stack and being handled in the routine designed to handle the loci. It was easier to write my own handlers and use global variables than to troubleshoot the ForEveryObject problem. Use as you see fit, but please credit me if you use this. Pat =============== Procedure ExtrudePolygonTo3DLoci; {? 2007, Coviana, Inc - Pat Stanford pat@coviana.com} {Licensed unde the GNU Lesser General Public License} {This procedure steps through each 2D Polygon} {on the active layer looking for 3D Loci located} {with the boundary of the poly. If there is } {exactly one 3D Loci within the Poly boundary} {the polygon is extruded to the Z-Height of} {the Loci and the Loci is deleted. If there are} {no 3D Loci or more than 1 3D Loci, the polgon} {is left untouched. Any remaining 2D Polygons} {and 3D Loci will be selected at the end of} {the procedure.} Var PolyHandle, LocusHandle: Handle; PolyCount,PolyIndex:Integer; PolyCriteria:String; PolyArray:DynArray of Handle; Procedure LocusHandler(LH_Locus, LH_Poly:Handle); {This procedure takes the locus handle and} {uses the Z+Height of the locus as the height} {to extrude a copy ofthe polygon pointed to by} {PolyHandle. The original polygon and the locus} {point are then deleted.} Var X1,Y1,LocusZ:Real; {X1,Y1 are dummy variables, we only need the LocusZ} NewExtrude:Handle; {Dummy Variable for Duplicate} Begin GetLocus3D(LH_Locus,X1,Y1,LocusZ); {Get Height to extrude to} BeginXtrd(0,LocusZ); {Start the extrude} NewExtrude:=CreateDuplicateObject(LH_Poly,Nil); {Need a new object to extude} EndXtrd; {End the extude} DelObject(LH_Poly); {Delete the original polygon} DelObject(LH_Locus); {Delete the locus point} End; Procedure PolyHandler(PH_Poly:Handle); {PH_Poly is a handle to the polygon} {This procedure gets the name of the polygon} {changes it to one we can use. It then counts} {the number of 3D Loci in the area of the} {Polygon. If there is exactly 1 Loci, it passes} {the Loci's handle to the LocusHandler procedure.} Var S1,S2,S3,S4:String; {Strings to hold the criteria and polygon name} Begin S1:=GetName(PH_Poly); {Store the existing name} S2:='COV_123-456-789'; {Set the temp name} S3:=concat('Loc=',S2); {Set up the criteria for the poly area} S4:=concat('(T=LOCUS3D) & (Loc=',CHR(39),S2,CHR(39),')'); SetName(PH_Poly,S2); {Set the poly name to the temp name} If Count(S4)=1 then {If only one poly then} Begin DSelectAll; {DSelectAll} SelectObj(S4); {Select the one locus point} LocusHandler(FSActLayer,PH_Poly); {Call the LocusHandler procedure with the handle to the locus point} End; SetName(PH_Poly,S1); {Restore the original poly name} End; Begin {Main Procedure} PolyIndex:=1; PolyCriteria:='(T=POLY)'; PolyCount:=Count(PolyCriteria); PolyHandle:=FInLayer(ActLayer); Allocate PolyArray[1..PolyCount]; {Make list of polys before we begin} While PolyHandle<> Nil do If GetType(PolyHandle)=5 then Begin PolyArray[PolyIndex]:=PolyHandle; PolyIndex:=PolyIndex+1; PolyHandle:=NextObj(PolyHandle); End Else PolyHandle:=NextObj(PolyHandle); {Use List of Polys to handle Areas} PolyIndex :=1; While PolyIndex <= PolyCount do Begin PolyHandler(PolyArray[PolyIndex]); {call PolyHandler Procedure} PolyIndex := PolyIndex + 1; end; DSelectAll; SelectObj((T=POLY)); SelectObj((T=LOCUS3D)); ResetOrientation3D; End; {Main Procedure} Run(ExtrudePolygonTo3DLoci); =================
  8. Emmanuel, Here is a script that I think will do what you want. Use it at your own risk. I recommend that you run it on a layer with only the polygons and locus points, but it should ignore any other types of objects on the layer. If a Polygon has only a single 3D locus point within its borders, it will be extruded (actually a copy will be extruded and the original deleted). Any remaining polygons and/or loci will be selected at the end of the script. If you need help in knowing what to do with the script to get it to run, check out this thread. Let me know how this works for you. Pat ================ Procedure ExtrudePolygonTo3DLoci; {? 2007, Coviana, Inc - Pat Stanford pat@coviana.com} {Licensed unde the GNU Lesser General Public License} {This procedure steps through each 2D Polygon} {on the active layer looking for 3D Loci located} {with the boundary of the poly. If there is } {exactly one 3D Loci within the Poly boundary} {the polygon is extruded to the Z-Height of} {the Loci and the Loci is deleted. If there are} {no 3D Loci or more than 1 3D Loci, the polgon} {is left untouched. Any remaining 2D Polygons} {and 3D Loci will be selected at the end of} {the procedure.} Var PolyHandle, LocusHandle: Handle; PolyCount,PolyIndex:Integer; PolyCriteria:String; PolyArray:DynArray of Handle; Procedure LocusHandler(LH_Locus, LH_Poly:Handle); {This procedure takes the locus handle and} {uses the Z+Height of the locus as the height} {to extrude a copy ofthe polygon pointed to by} {PolyHandle. The original polygon and the locus} {point are then deleted.} Var X1,Y1,LocusZ:Real; {X1,Y1 are dummy variables, we only need the LocusZ} NewExtrude:Handle; {Dummy Variable for Duplicate} Begin GetLocus3D(LH_Locus,X1,Y1,LocusZ); {Get Height to extrude to} BeginXtrd(0,LocusZ); {Start the extrude} NewExtrude:=CreateDuplicateObject(LH_Poly,Nil); {Need a new object to extude} EndXtrd; {End the extude} DelObject(LH_Poly); {Delete the original polygon} DelObject(LH_Locus); {Delete the locus point} End; Procedure PolyHandler(PH_Poly:Handle); {PH_Poly is a handle to the polygon} {This procedure gets the name of the polygon} {changes it to one we can use. It then counts} {the number of 3D Loci in the area of the} {Polygon. If there is exactly 1 Loci, it passes} {the Loci's handle to the LocusHandler procedure.} Var S1,S2,S3,S4:String; {Strings to hold the criteria and polygon name} Begin S1:=GetName(PH_Poly); {Store the existing name} S2:='COV_123-456-789'; {Set the temp name} S3:=concat('Loc=',S2); {Set up the criteria for the poly area} S4:=concat('(T=LOCUS3D) & (Loc=',CHR(39),S2,CHR(39),')'); SetName(PH_Poly,S2); {Set the poly name to the temp name} If Count(S4)=1 then {If only one poly then} Begin DSelectAll; {DSelectAll} SelectObj(S4); {Select the one locus point} LocusHandler(FSActLayer,PH_Poly); {Call the LocusHandler procedure with the handle to the locus point} End; SetName(PH_Poly,S1); {Restore the original poly name} End; Begin {Main Procedure} PolyIndex:=1; PolyCriteria:='(T=POLY)'; PolyCount:=Count(PolyCriteria); PolyHandle:=FInLayer(ActLayer); Allocate PolyArray[1..PolyCount]; {Make list of polys before we begin} While PolyHandle<> Nil do If GetType(PolyHandle)=5 then Begin PolyArray[PolyIndex]:=PolyHandle; PolyIndex:=PolyIndex+1; PolyHandle:=NextObj(PolyHandle); End Else PolyHandle:=NextObj(PolyHandle); {Use List of Polys to handle Areas} PolyIndex :=1; While PolyIndex <= PolyCount do Begin PolyHandler(PolyArray[PolyIndex]); {call PolyHandler Procedure} PolyIndex := PolyIndex + 1; end; DSelectAll; SelectObj((T=POLY)); SelectObj((T=LOCUS3D)); ResetOrientation3D; End; {Main Procedure} Run(ExtrudePolygonTo3DLoci); =============
  9. Chris, My guess is that the units the DXF file was created in are different than the units you are using. In the Import Options dialog box check the Unit Settings: If the objects are about 2 1/2 times too small, they are probably in centimeters. Set the dialog to 2.54 DXF Units = 1" If the objects are about 25 times too small, they are probably in milimeters. Set the dialog to 25.4 DXF Units = 1" If the objects are about 12 times to small they are probably in feet. Set the dialog to 1 DXF Units = 1' (that is a foot mark, not an inch mark). Pat
  10. No, but I have used to fine tune a view to highlight a detail I need to show. You are correct that for general use, the walkthrough and flyover are better used on a sheet layer. Wth Stack Layers, a Design Layer Viewport or a model layer made of Layer Links, you get a much more interactive process. You can get the view you want and then create the viewport from there. If you find out later that you didn't get it quite right, you can modify it in the crop rather than having to create the entire viewport again. Pat
  11. Peter, This is only partially correct. While a viewport is designed to be primarily static, while you are in Edit Crop mode, you can use the view manipulation tools (Flyover, Walk Through, Translate View, Rotate View) to fine tune the view. You can't use the Camera tool in a Crop though. Pat
  12. Enovo, I think I have the core part of the script, but need some more details. 1. Is there anything in the layer beside the polygons and loci? If so, can we move the objects we are concerned with to a layer or class of their own? 2. Is the record you want to assign the Z values to already attached to the polys? If so, what is the name of the record and the field you want the data stored in. 3. Does each poly have one and only one loci inside of it? 4. Do the polys overlap at all? I am evisioning this with each poly kind of a piece of a jigsaw puzzle. 5. Are they all polygons or are some of the poly polylines? 6. We can do either the store the Z in a record, or we can do the extrude. Both are equally easy from a script. Which would you prefer? 7. Would you like to keep or delete the loci after the value has been set to the poly? Regards, Pat
  13. Yes, there are known bugs in VW2008 at least as far as SP1. I am downloading SP2 and will test the callout tool then. I think some/most of the problems are fixed in SP2 though. Pat
  14. Select the first row of the database section of the worksheet. Probably one row below the header text. In the column headers (A,B, etc.) you should see the sort icons. Move them as necessary. Pat
  15. There is a problem in VW2008 SP1 (on Mac at least) that when you draw a callout in a Viewport annotation, it disappears. SP1 also breaks the link between the callout and the legend on callouts in annotation imported from VW12. I think this is one of the things that is supposed to be fixed for the next version. As best I can tell in SP1 callouts and keynotes work OK on Design Layers. Pat
  16. As Peter said, you need to create the object on a Design Layer. 1. Draw a rectangle. 2. Select Extrude from the 3D menu. Enter the heigh to extrude to. 3. Use the Flyover tool to change the view to see the object in a 3D view. 4. Select Create Viewport from the View menu. Answer the questions about the viewport and put it on a new Sheet Layer. 5. You are know looking at your 3D object in a viewport. Pat
  17. Custom Visibility has been in the Tool menu of the standard workspaces for as long as I can remember. Do you use a custom workspace? That is one of the problems that I see with custom workspaces. You get it set and comfortable with it, and when a new veriso ncomes out, you never get around to checking out "ALL" of the new features. It is kind of like working with one hand tied behind your back. Pat
  18. How about another explaination: If you think of a container object as a bag. With the bag closed (only the bags class visible) you will only be able to see the bag. With the bag open (the bag class and the class(es) of contained objects visible), you can see what is inside it. And here is where the analogy breaks down, if you hide the bag somewhere (bags class invisible) then you can't see anything at all. Think about other ways of hiding objects rather than using the classes. two of my favorites are: Create another group (temporary or permanent) for the objects you want to edit (say the top drawer). and set your preferences to not show other objects while in groups. You will only see a few objects at a time. Use custom visibility. I almost always add two visibility scripts to my drawings. The first is Show All. The second is Hide Selected Objects. These can both be easily created using the Save Script function of the Custom Visibility tools. If something is in the way, juse select is and run the Hide command. When you need it back, select the Show All command. If we had your preferred option, then we would not be able to use class attributes for anything inside a group. I absolutely need that functionality for the way I work. Pat
  19. The best suggestion I can offer is to not try to move object in isometric or other 3D views. Due to the geometry of the display on a flat screen it will only cause frustration as you have found. The better way to work is to move the object twice in the primary views (front/top, left/front, back/right, etc.). If you use working planes, you could do something similar around the I,J,K axis. The other option is to use the 3D snap points if you can. Pat
  20. I don't understand. Can you explain what you are asking differently? Pat
  21. As Katie said above, check the on-line help. It has exactly the same information as the printed manuals. I just happend to have the manuals handy and VW was not running, so I looked it up that way. The new Help fix for Safari on Macs has improved the help access speed tremendously. Probably a 2 to 3 X speedup on my machine. Pat
  22. Michael, Select (don't double click) the section line and look closely. You should see two selection handles. One is centered in the middle of the two bits of text, the other is at the end point of the section line. Grab the one for the text and drag it to the other one. Does that look like you want? The problem that I have found (other than having to do this in the first place) is that the text is behind the rest of the pieces in teh stacking order, so once you get the two handles coincident, you can't grab and move the text again. I am working on a script to do the alignment. It works, but it needs some polish. How would you like to see the script work? Active Layer, All Layers? You could probably also edit the Paramters for the Section-Elevation Marker PIO. Item 18, ControlPoint01X has a default of 0.1. Change this to 0 and it should be centered. I know it says NNA DO NOT CHANGE!!!!!!!!, but I think this would be safe to do. Downside is you would have to do it after every upgrade. Regards, Pat
  23. Petri, Actually the functionallity was enhanced, but as often happens the enhancement was hidden. Right click (Control Click) on a symbol and select Edit from the contextual menu. You will get a dialog box that asks what part of the symbol you want to edit along with a pull down menu labeled "Double Click." The Options under Double Click are: 2D 3D Current View Bring up Dialog I don't know how your system got set to always edit the 2D, but at least it is (should be) easy to set back to your desired functionality. Pat
  24. Check out Chapter 15 of the Design Series manual. It has information on creating a custom title block that will work with the drawing border. I think they will also work with the Issue Manager. You can edit the symbols and text as much as you want in any of the Title Block symbols and still have them work with the automation. The only trick is that any fields that you want linked to the automation must have the Field Name match the names in the Record. This means that Project fields must start with P_ Sheet with S_ Pat
×
×
  • Create New...