Jump to content

MullinRJ

Member
  • Posts

    1,987
  • Joined

  • Last visited

Everything posted by MullinRJ

  1. Yes! The Plane: menu in the OIP will change the plane of selected objects. The Plane: menu at the top of the screen only affects newly drawn objects. Set the plane at the top of the screen to what you want and leave it there. Best option. Open a new document. Set the PLANE Menu at the top of the screen to what you want for most of your drawing. Save this file with "Save as template...". Name the file "Default.vwx" Next time you open a new file, the plane will be what you want and all 2D objects will be drawn there. Raymond
  2. Check to see if you have the "Zoom Line Thickness" preference turned OFF. Fat lines look even fatter when it is off and you zoom out. I'm not sure how it affects printing. Raymond
  3. Bruce, That's already in the OIP. The check box is in the guise of a Popup Menu and has the options Screen Plane / Layer Plane. One projects the other doesn't. I think your frustration will diminish when the tool interactions with the planes gets worked out. Having the two planes is not a problem. Having them switch, and not being able to lock them to one or the other, is the problem. Raymond
  4. Try these Pref values. They should be available in VW 2010 SP4. SnapToGrid = 37 SnapToObject = 38 SnapAngle = 470 SnapIntersect = 471 SnapSmartPoints = 472 SnapDistance = 473 SnapSmartEdge = 474 SnapConstrainTangent = 475 SnapConstrainToWorkingPlane = 476 SnapConstrainWorkingPlaneNormal = 477 Raymond
  5. Bruce, ???NV is aware of the problem and is working hard to deliver the best product possible. I have seen them fix bugs in days, obviously most take a bit longer. I over stated the seriousness of the situation, probably because I responded late and was tired. ???Since the tool does work if you move the vertex, my advice is not to click on a vertex without moving it, and use Undo if you forget. The problem is reported and it is slated to be fixed. My apologies for sounding negative. All the best, Raymond
  6. If you are using VW 2010, it probably is the wrong mode. But if you are using VW 2011, then it is a serious bug with the 2D Reshape tool. I reported it several months ago, but it's not slated to be fixed until VW 2012. Undo is your friend. Raymond
  7. Line Widths in VW are limited to Paper Space and have a range of values from 1 mil to 255 mils (0.0254 mm to 6.477 mm). The ends are displayed as rounded if Quartz Imaging is turned on, and as Square if it is off, but they are never flush. If Quartz Imaging is turned off, then the displayed line width varies as the angle of the line changes, which is a screen artifact, but it will print that way, too. I think the PC and MAC versions differ in this respect, but I'd have to check. I'm speaking strictly MAC here. The apparent value of line widths in real units can be controlled by adjusting the Layer Scale, but this does not affect the end caps, only the width. End Cap control (Square, Rounded, Flush) has been requested many times, but never implemented. I doubt it will happen anytime soon; that is to say NV has made no statement one way or the other on its implementation, so if I were you I'd assume it won't happen rather than wait for it. If you want infinite control of how lines look you will have to draw them as outlined objects - Polygons. Yes, this is a pain, but it can be done. It is even possible to convert stroked Lines and Polys to outlined Polys with a VectorScript. Converting the Dash Style would be an amazing achievement, but in theory could also be done. There are probably easier ways to get what you want than to go down this trail. HTH, Raymond
  8. At one time in the distant past, Shift-Selection was additive. I remember someone at DG / NNA say this was changed to make it more consistent with they way selection is done in the Finder and in other programs. Well, I don't draw in the Finder or in other programs and I like the way it used to work. I'd love to see a user preference for this as I often need that feature. I also need the Select / Deselect toggle mode that currently exists. I've requested a preference at least once formally, but it never went anywhere. I'll try again. It's really not a good program when one mode is traded for another but both are needed. Raymond
  9. Vincent, ???Saved Views will save Class Visibilities. Save them in a template file and they will be available each time you create a new document from that template. You can also add a script to a saved view that will do anything you can script. Unfortunately, Saved Views cannot be copied easily from file to file. Raymond
  10. Hello Nadia, ???You can have "show/snap/modify" set for Layers and also for Classes. The settings are independent of each other. The most important one to have set to "show/snap/modify" is Classes, otherwise only objects in the Active Class may be selectable and editable. You can change the Active Class with the PopUp Menu at the top left of the drawing window, or with the CMD-LeftArrow and CMD-RightArrow keys. ???If this doesn't help, then do as Peter suggests and post a sample file. Raymond
  11. MullinRJ

    Prefs

    Michael, ???The unit mark for inches is a double quote, and not two single quotes next to each other. ???In Pascal strings, the single quote is used as the string delimiter, one at either end of the string. Everything in between is considered text. If you want to use a single quote inside your text, then you have to do something to tell the compiler that a single quote should not be used as a delimiter and should be used as text. Using 2 single quotes together inside the string will translate to 1 single quote in the output, and the compiler will not try to terminate your string when it sees the first single quote in the pair of single quotes. e.g., Don't fence me in. is expressed as a Pascal string as: 'Don''t fence me in.' Note the 2 single quotes in Don''t. Now, if you remove all the letters, so that you only have the single quote remaining in the string you will get: ''''. That's 4 single quotes, 2 for delimiters and 2 for the single quote itself, and not to be confused with a double quote surrounded by single quotes. '"' They look identical in the font on my screen, but they are not. To tell the difference, walk your cursor through the text. Four characters vs. three characters. HTH, Raymond
  12. That's odd, because when I use JOIN on two lines, they join perfectly. Is your problem with the JOIN command or the COMPOSE command? Are the objects you are having trouble joining Line-Line, Poly-Poly or Line-Poly? Raymond
  13. As I enter the sanctimonious halls of this unadorned 700 Club, I look around and see seven others in my midst, but four are soon to leave for higher numerical acclaim. But far out in the distance, over a hill and beyond a cloud of dust, there can be heard the thundering keyboards of the Techboard's Top Five! In the last month the most prolific poster for many years gave up his crown, not to one, but to two noteworthy contenders. islandmon held the lead by a respectable margin for more years than I was paying attention, and on the 12th of last February the lead fell to Christiaan who had been pacing the islandmon for many, many moons. Victory is enjoyed in silence but for a fleeting moment. Then again without fanfare of trumpet or the roll of a drum, the torch passed again a mere 31 days later. CipesDesign currently strides in front of that rising cloud of dust. His position is guaranteed by nothing, and should he turn and look backwards through the haze he may notice another streak, approaching faster than all the others. Ray Libby is gaining on you. Run Peter, run; or be prepared to proffer the torch to the next amazing poster. Thank you all, for your combined and continuing help to this community. Raymond
  14. Jet, How many objects do you have selected when you run the JOIN command? Raymond
  15. Jet, Are you trying to use the JOIN command on all the lines at once? I believe it only works on 2 selected lines at a time. You are in need of a script that would sort through all the endpoints and join the ones that are close. I think what you want can be bought at VectorBits. See ChainMaker. http://www.vectorbits.com/VectorBits_2011/vectorbits/vectorbits.html HTH, Raymond
  16. Hello Helmut, ???The first SYMBOL line will get you the rotation corrected, but the coordinates will still be those from before the Plan Rotation. ???X := -5; ???Y := 10; ???SYMBOL ('Symbol-1', X, Y, -GetPrefReal(93)); ???This will get you working in Plan Rotation for both the XY grid and the angle grid. ???ScreenVecToModelVec(X, Y); ???SYMBOL ('Symbol-1', X, Y, -GetPrefReal(93)); HTH, Raymond
  17. Hi Orlando, ???Good job. 1) Use GetOrigin, then save the values in a record format with NewField; or write them to a worksheet cell; or save them in a text block in a SymDef. Your choice. 2) Use Num2Str(Decimals, Number); 3) You can get the handle to the first object inside a symbol definition with: ???FInSymDef(GetObject('SymbolName')); then get the rest with a WHILE or REPEAT loop and NextObj(). If you change the class of the symbol contents then it will be the same for all symbol instances of that symbol name in your file. Only the placed symbol instances can have different class names from each other. This may be what you want, but I'm not sure what you are trying to do. 4) Change the value in the attached record of your markers by the delta of your elevation move. Whatever value is in the attached record will display in the symbol. Use SetRField() once you get a handle to a symbol's attached record. HTH, Raymond
  18. Orlando, ???You are very welcome. You are trying to move very fast from fancy to luxury. Most of what you are describing would require your static markers to be dynamic. To do that you would need to develop a Plug-In-Object. Definitely not as easy, but very much doable. ???If all you want to do is move everything up or down globally, with what you already have it would be much easier to write another script to adjust your markers. You can change the value stored in each record by a fixed amount and the symbols will then display the new value. ???Have a look at ForEachObject() or ForEachObjectInLayer() and have it modify the records of your symbol instances using SetRField(). You can search the TechBoard for examples of using these calls, several have been posted. Raymond
  19. So, now you want to get fancy? Well you picked a good example to show a neat feature of VW ? linking text to a symbol. If you create one symbol for every elevation marker you place, you'll end up with a lot of symbols that are all the same except for the value inside. VW has a way of creating a symbol with dummy text inside that gets overwritten when the symbol gets placed in the drawing. The magic is in a record that also gets attached to the symbol that has the value you want displayed. I modified your script to do just that. I commented the code to show how it works, but if you'd like further explanation, please write back. Raymond PROCEDURE FindYcoord; { Place a custom Elevation Marker symbol on the drawing that shows the elevation of where it was placed. } { The symbol does not update if moved. The symbol uses Linked Text to show the Elevation. } { If the symbol or record format do not exist when the script is run, they are created. } { To use, click once at the 0 Ref Elev. No marker is displayed, but the reference is stored. } { Subsequent clicks place Elevation Markers relative to the first click. } CONST ElevClass = 'cota altimetrica'; ElevRec = 'ElevRec'; { change this name to suit you } ElevFld = 'ElevField'; { change this name to suit you } ElevSym = 'ElevSym'; { change this name to suit you } VAR x1, y1 : REAL; x3, y3 : REAL; CurrentCl : STRING; BEGIN DSelectAll; PushAttrs; { save graphic state } CurrentCl := ActiveClass; NameClass(ElevClass); SetClUseGraphic(ElevClass, true); SetClPenFore(ElevClass, 0, 0, 0); SetClPenBack(ElevClass, 0, 0, 0); SetClLW(ElevClass, 1); SetClLS(ElevClass, 5); SetClFPat(ElevClass, 0); ShowClass(ElevClass); LSByClass; LWByClass; PenColorByClass; FillColorByClass; FPatByClass; NameClass(CurrentCl); { remove this line if you want the symbol parts in the Elev Class. } { Create the Record Format if it doesn't exist. } IF (GetObject(ElevRec)=nil) then NewField(ElevRec, ElevFld, '0', 3, 0); { Create the Symbol if it doesn't exist. } IF (GetObject(ElevSym)=nil) then begin BeginSym(ElevSym); MoveTo(-0.10, 0.17); LineTo(0, 0); LineTo(0.14, 0.25); LineTo(0.74, 0.25); TextSize(12); TextJust(2); TextVerticalAlign(4); TextOrigin (0.44, 0.27); FillPat(0); BeginText; Num2StrF(0.000) EndText; LinkText(LNewObj, ElevRec, ElevFld); EndSym; end; { IF } PopAttrs; { restore graphic state } GetPt(x3, y3); { This is where the reference elevation is stored } WHILE TRUE DO BEGIN NameClass(CurrentCl); { return to current class } GetPt(x1, y1); { Elevation marker will be placed at this point } NameClass(ElevClass); { Elev symbol instance goes in this class } SYMBOL(ElevSym, x1, y1, #0); SetRecord(LNewObj, ElevRec); SetRField(LNewObj, ElevRec, ElevFld, Num2StrF(y1 - y3)); RedrawAll; DSelectAll END; { WHILE } END; Run(FindYcoord);
  20. Orlando, you shouldn't have to change the User Origin. When this script is running the first click should be at the 0 elevation point to set your reference. No marker is placed on the first click. Markers get placed on all subsequent clicks until the script terminates. Raymond
  21. Hello Orlando, There appear to be two problems in the script that I can see. First, ???WHILE (h1 := 0) DO BEGIN?????{ THIS IS AN ERROR } should read: ???WHILE (h1 = 0) DO BEGIN or better: ???WHILE TRUE DO BEGIN which is the same thing, as h1 is always 0, so it always evaluates to TRUE. Second, these lines have a BLANK at the front of the Class Name: ???SetClUseGraphic(' cota altimetrica',true); ???SetClPenFore(' cota altimetrica',0,0,0); ???SetClPenBack(' cota altimetrica',0,0,0); ???SetClLW(' cota altimetrica',1); ???SetClLS(' cota altimetrica',5); ???SetClFPat(' cota altimetrica',0); ???ShowClass(' cota altimetrica'); but your NAMECLASS statement does not. ???NameClass('cota altimetrica'); They should be the same. Either add a blank to the former or remove the blanks from the latter. I noticed your script does not put your elevation markers into the class "cota altimetrica". If you change your program to replace this line: ???GetPt(x1, y1); with: ???NameClass(CurrentCl); ???GetPt(x1, y1); ???NameClass('cota altimetrica'); you should get the effect I think you are after. When the program exits, your class will be returned to the current class. HTH, Raymond
  22. Ciao Andrea, ???Your code rotates the most recently created object around the User Origin and not around the object's center. Try replacing your line: Rotate3D(protx,0,0); with: Get3DCntr(LNewObj, Xcen, Ycen, Zcen); Set3DRot(LNewObj, protx, 0, 0, Xcen, Ycen, Zcen); If it works, it will get the center of each extrude as it is created and use that point for the rotation center. I haven't tested it, so it may not work. Write back if you need more help. Raymond
  23. I think your only recourse is to rename your folders. Add a number to the front of the folder names to set the order to your liking, or add a series of blanks to select folder names to elevate them in the sorting order. There is no way to drag them into the order of your choosing. HTH, Raymond
  24. It's a change in VW. Raymond
  25. Francesco, ???Every item in a modern dialog has an ID number. When a user clicks on, or types into one of the items, the Modern Dialog "machinery" senses which item was invoked and passes the item's ID number to a routine that you have to write. That procedure will usually have a case statement inside with one case item for every active dialog item ID. You tell the Modern Dialog "machinery" what that procedure is with the RunLayoutDialog() command. ???If your button has an ID of "10", then you will have to write code inside the case statement, for item = 10, to tell your program what to do when it gets pressed. Here's a sample routine for doing something for ITEM 10, which you defined with your CreatePushButton call. PROCEDURE Dialog_Handler(var item :LONGINT; data :LONGINT); Begin ???case item of ??????10: begin ?????????{ Do your thing here } ??????end;??????{ 10 } ???end;??????{ case } End;??????{ Dialog_Handler } There are many short examples in the VectorScript Function Reference. Check out "CreatePullDownMenu" and "CreateColorPopup" for some short examples that work. Also check online at http://developer.vectorworks.net/index.php?title=Main_Page Write back when you have more questions. HTH, Raymond
×
×
  • Create New...