Jump to content

MullinRJ

Member
  • Posts

    2,017
  • Joined

  • Last visited

Everything posted by MullinRJ

  1. In a script that is used in a palette, you can use GetOrigin(), but the script you are copying appears to be headed for a PIO. GetCustomObjectInfo() is used in PIO's, but not in stand alone scripts. GetOrigin() doesn't work in PIO's. It looks like you are trying to make a tool that places a position marker where you click. I will be out for several hours, but if anyone else wants to have a go at this, please have at it. Raymond
  2. Use the following and subtract these values from your point. GetOrigin(Xorig, Yorig); Raymond
  3. Scale adjusts the display on screen and at print time. Other factors also contribute to what you see, like Zoom, but a layer's scale does not affect an object's dimensions. Draw your object with the right dimensions and place it anywhere you want. It will scale properly. Raymond
  4. Must be my machine. Thanks, Raymond
  5. Hi Peter, I tried DelObject(ActLayer), where the active layer is a WG referenced layer. As you said, it doesn't work. On a whim I tried the same thing, but I moved to another layer before deleting the WGR layer. It was deleted. You cannot delete the layer if it is Active. Move to another layer then delete to your heart's content. See following script for an example. HTH, Raymond code: Procedure DelWGR; { If the Active Layer is a WGR, delete it. } VAR LHnd, TmpLHnd :Handle; WGRPath :String; BEGIN WGRPath := ''; LHnd := ActLayer; if IsLayerReferenced(LHnd, WGRPath) then begin TmpLHnd := PrevLayer(LHnd); if (TmpLHnd = nil) then TmpLHnd := NextLayer(LHnd); if (TmpLHnd <> nil) then begin Layer(GetLName(TmpLHnd)); { move to another layer } DelObject(LHnd); message('WGR Layer - ', WGRPath, ' - has been deleted.'); Sysbeep; end else message('Cannot delete WGR if it is the only layer in the file.'); end; END; Run(DelWGR);[/code]
  6. Do you have the Quartz Imaging preference turned on?
  7. I am seeing a delay from 1-2 seconds when I use the scroll wheel to Pan the drawing. About 1 second when I roll the wheel 1 click, and at least 2 seconds if I roll it several clicks quickly. When I turn off Quartz Imaging (which I really like), the Pan response goes back to normal. Toggling the "Hardware Accelerated 2D Navigation" preference has no apparent effect. The drawing is very simple, four 2D polylines with fill and stroke. I know my computer is on the slow end of the technology curve, but I am curious if other users, especially those with faster machines, see this delay? Thanks, Raymond G4 Dual 500 / 1GB RAM / OSX 10.3.9 VW 12 Designer
  8. Is it possible to specify the point size of scripts in a Script Palette? Not in the VectorScript Editor window, but the script palette itself. If not, I'd like to make a wish. The tool set names in the Tool Sets palette display nicely, but my scripts are 1 or 2 points smaller and are not very clear. Thank you, Raymond VW 12 Designer G4 500 Dual (it used to be fast) OSX 10.3.9
  9. Hi Andrew, What happens if you use: H1 := FInGroup(H); where H is the handle to your supposed ARC? Does H1 point to an ARC? Raymond
  10. To the best of my knowledge, there is no current support for horizontal spacing. Raymond
  11. michi, Do yo have an immediate need to translate anything to Gerber? I would be more than happy to help. Raymond
  12. Use the U key when you draw with the Polyline tool to cycle through the types of points to be inserted next. You can correct the radii afterward with the 2D Reshape tool. If you set the Fillet Radius to 0 before you draw, the tool will insert the largest radius possible for that vertex. You can also draw a Polygon or Polyline (corner points only) and convert points to ArcPoints afterward with the 2D Reshape tool. And, if you need to do this a lot, you can always write a script (or have one written for you) to make a custom tool that simplifies the repetitive parts of the task. HTH, Raymond
  13. Hi Nick, Line widths are really set in mils (1/1000's of an inch), and have values of 1-255 mils. Even though you can also set them in mm or points, the internal representation is still in mils. The following should help show how it maps. mm = mil 0.03 = 1.18 - rounds to 1 mil (minimum value) 0.04 = 1.57 - rounds to 2 mils 0.05 = 1.97 - rounds to 2 mils 0.06 = 2.36 - rounds to 2 mils 0.07 = 2.76 - rounds to 3 mils 0.08 = 3.15 - rounds to 3 mils ... 6.47 = 254.7 - rounds to 255 mils (maximum value) As you can see, the mm scale is not uniform, especially at 1/100 mm resolution. I don't know if there is any change in how this is done in v12 as I am still awaiting the delivery guy. The display toggling between 0.04 -> 0.05 -> 0.04, etc., is VW's way of showing the equivalent mm value of the 2 mil line by using the last mm value you typed in. Unfortunately, you cannot have both, so to appear consistent, VW displays the last entered mm value for all 2 mil lines, since 0.04mm and 0.05mm are really the same thickness. HTH, Raymond
  14. Hi Kevin, You're right, it is simple. It's a 1 line script: Rotate(45); This will always rotate all selected objects CCW around their collective center. You can have another script to rotate CW: Rotate(-45); If you want to make menu commands instead of scripts, check the VW User's Guide or search this board for instructions on creating a menu command, or ".vsm" object. You can also search the VectorScript List at: http://lists.nemetschek.net/archives/vectorscript-l.html Raymond
  15. If you have a handle to the Group object, use hCenter(grpHand, X, Y);
  16. Hello Eddie, How big are the hard drives, and have they been defragmented recently? Raymond
  17. An Oval in VW is an ellipse. If you convert it to a Polyline, it becomes an approximation using Bezier Curves. If you rotate it, it becomes a Polyline. What do you need to dimension? Major and minor axes are easy. Foci can be found with a little math. Raymond
  18. Sorry Steve, You're right, that's not the right routine, it's for vectors. You need to use SetRot3D. Here's some code that rotates an object around its center point and even corrects a bug in the call. You should be able to adjust the parameters to suit your needs. HTH, Raymond code: procedure StandItUp; VAR Hnd :Handle; X, Y, Z, Xcen, Ycen, Zcen :Real; BEGIN Hnd := FSActLayer; Get3DCntr(Hnd, Xcen, Ycen, Zcen); { find the center point } SetRot3D(Hnd, 90, 0, 0, Xcen, Ycen, Zcen); { absolute rotation on X-axis } Get3DCntr(Hnd, X, Y, Z); { go find it } Move3DObj(Hnd, Xcen-X, Ycen-Y, Zcen-Z); { move it back } END; Run(StandItUp);[/code]
  19. Steve, Check out this old thread. http://techboard.nemetschek.net/ubb/ultimatebb.php?ubb=get_topic;f=21;t=000163 Raymond
  20. If it was created by the Quarter Arc tool, the radii from the center to the endpoints would be half of the major and minor axes, which would be the ∆X & ∆Y values of the bounding box. Other values are harder to get. Raymond
  21. Would a hybrid symbol work for you? 2D & 3D poly joined at the hip? Raymond
  22. Katie posted this last week on 10 August 2005: quote: The list is now available. Please see the information here: http://www.nemetschek.net/downloads/vectorworks/version11/1151ReleaseNotes.html -------------------- Katie Tech Support Specialist Nemetschek North America katie@nemetschek.net
  23. This isn't optimal, but it works. Duplicate your LOCI along the ARC in the CW direction with your fixed setting. Select all LOCI and the ARC. Then use the 2D Mirror tool. With the ARC selected, a snap point at the center of the ARC shows as does a snap point in the middle of the ARC. Mirror your LOCI across the line that connects these two snap points. Raymond
  24. Hi dirlep, You need to call those two procedures from a MAIN body, which is missing. The following compiles, but does not run, because you do not have an event loop defined properly in your second procedure. I added your MAIN body in the following, but you'll have to add a CASE statement to the second procedure to trap the items being clicked. It is of the form: code: case item of SetupDialogC: begin end; 1: begin end; { OK } 2: begin end; { Cancel } 3: begin end; { your items } end; { case }[/code] Your code should be part of one of the items in the CASE statement, possibly the OK button. You are about 90% done. Raymond code: procedure MyDialog; VAR id, result :Integer; FUNCTION Define_MyDialog : INTEGER; VAR id: LONGINT; BEGIN id := CreateLayout('puntjes zetten',TRUE,'Doe maar', 'effe wachten'); CreateStaticText(id,4,'Geef X1:',-1); CreateEditReal(id,5,4,0,10); CreateStaticText(id,6,'Geef y1:',-1); CreateEditReal(id,7,4,0,10); SetFirstLayoutItem(id,4); SetRightItem(id,4,5,0,0); SetRightItem(id,5,6,0,0); SetRightItem(id,6,7,0,0); { perform final control alignment and adjustment } AlignItemEdge(id,4,1,1001,0); AlignItemEdge(id,8,1,1001,0); SetHelpString(1,'Voert het gevraagde uit.'); SetHelpString(2,'stop en sluit.'); SetHelpString(4,'beetje uitleg nodig?'); SetHelpString(5,'amaai.'); Define_MyDialog := id; END; PROCEDURE Drive_MyDialog(VAR item:LONGINT; data:LONGINT); VAR x,y,y1,x1:REAL; id: LONGINT; result : LONGINT; BEGIN DSelectAll; GetPt(x, y); {bepaald het invoegpunt} SetOrigin (x,y); locus(x,y); PushAttrs; PenFore(255); PenBack(0); PenPat(2); PenSize(14); PenPat(2); Marker(0, 0.125000, 15); NameClass('beton sier'); Poly(1,0 , 0,1 ,0,12 ,x1,y1, 1,0 , 4,0 , 1,0 ); PopAttrs; SetOriginAbsolute(0,0); dselectall; END; Begin id := Define_MyDialog; result := RunLayoutDialog(id, Drive_MyDialog); End; RUN(MyDialog); [/code]
×
×
  • Create New...