Jump to content

WhoCanDo

Member
  • Posts

    435
  • Joined

  • Last visited

Everything posted by WhoCanDo

  1. Try either of the SetPolylineVertex lines below independently and they work but allowing both to run produces an object with the bottom right curve at 94.65° but not the 140° as required. Any ideas as to how I can get this working? procedure test; var h1 : handle; x, y, vertexType, vertexRadius : real; begin Poly3D (5, -5, 0, 300, -300, 0, 300, -757, 0, 5, -462, 0); h1 := ConvertToPolyline (LNewObj); GetPolylineVertex (h1, 2, x, y, vertexType, vertexRadius); SetPolylineVertex (h1, 2, 300, -300, 3, 140, true); { SetPolylineVertex (h1, 3, 300, -757, 3, 140, true); } end; run (test);
  2. I've battling the for a couple of days now and can't get my head around Poly3D and then I discovered that it's GetPt3D that's throwing me off. procedure test; var vec1 : vector; h1 : handle; begin DSelectAll; GetPt3D (vec1.x, vec1.y, vec1.z, false); Poly3D (5, 0, 0, 300, 0, 0, 300, -457, 0, 33, -457, 0); h1 := ConvertToPolyline (LNewObj); SetPolylineVertex (h1, 2, 300, 0, 3, 90, true); SetPolylineVertex (h1, 3, 300, -457, 3, 90, true); end; run (test); In front view I get a different result with and without GetPt3D. I want the Poly3D to be on the top view no matter what view I am in so what's going wrong? If you test the above without GetPt3D and in any view then you get the result I want but I want to ask the user where they want the result to be after creating it.
  3. I can get my macro to edit the profile if the user chooses "Path" when EditObjectSpecial (h, 4); is used, but I don't want user input. How do I edit or delete and replace the profile in Extrude Along Path?
  4. GetPt3D will select a 3D point but how do you pick the object at that point? If I run a macro that wants a 3D object to be selected but I have forgotten to pick the object before the VS runs then how do I allow the operator to select and object while in 3D view?
  5. Isn't GetLine3D suppose to pick points from different Z planes? I have a Locus on Z+200, Z0, Z-200 & X100,Z0 If I run the following macro then I can pick any locus first but no other if I am in any view other than iso and then only the one on the Z0 plane. Surely I should be able to pick any loci being this is a 3D tool and set to False. Can anyone suggest a reason for this or a way around this? procedure test_this; var p1X, p1Y, p1Z, p2X, p2Y, p2Z : real; begin GetLine3D (p1X, p1Y, p1Z, p2X, p2Y, p2Z, false); Poly3D (p1X, p1Y, p1Z, p2X, p2Y, p2Z); end; run (test_this);
  6. Thanks Guys, Yes Miguel, the technical explanation was exactly what I needed. Regards
  7. With GetLine3D (p1X, p1Y, p1Z, p2X, p2Y, p2Z, false); I can get the beginning and end point of a 3D line but if I want to calculate the points 5mm shorter at one end or 5mm shorter at the other end then how can I calculate this? procedure test; var h : handle; p1X, p1Y, p1Z, p2X, p2Y, p2Z : real; begin GetLine3D (p1X, p1Y, p1Z, p2X, p2Y, p2Z, false); Poly3D (p1X, p1Y, p1Z, p2X, p2Y, p2Z); h := ConvertToNurbs (LNewObj, false); Message (LengthN (Sel=True)); end; run (test);
  8. At the moment (VW2014) the script editor for macros contained within each sheet is restricted to 32000 characters which seems to relate to the 32 bit environment. I can cut and paste or write more characters but only when saving the script is the problem is highlighted. $Includes and plugins are not an option for portability or security of code so please fix this asap. Regards
  9. I'm probably behind the times here but I have never used $Include until this instance when my script got too large and it was suggested as a solution. Normally I write the macro scripts, not as plugins, and lock them within the stationary sheet so that the drawing is a single entity and is transportable throughout the office and to other sites. In this case the text files are on our server and accessible by the vectorscript localy. They can't be locked and if I send my stationary to our out-of-country site then they have to have the same $Include path for the macro to work. Do you have an alternative setup suggestion?
  10. There is definitely a limit related to 32bit. I finished my script using $Includes but I'm not happy because I can't make the $Include files secure and sharing the $Include files across the networks and also making them transportable is a nightmare. When I add all the code to the internal script editor and then "OK", I get the message "The Script contains 79670 characters. 47669 of which will be lost. Do you wish to continue? The Script Editor can not save a Script with more that 32001 characters. etc." I would have thought that VW would be 64bit by now.
  11. Yes, I can see your reasoning. CreateExtrudeAlongPath seems to take my donut profile and extrudes along the path without a hole. ExtrudeAlongPath doesn't seem to work at all. However, I couldn't get CreateCustomObjectPath to work either until you offered a solution.
  12. Thanks Mate, Why do they make it so difficult when DoMenuTextByName ('Extrude Along Path', 0); would have done. Regards
  13. I want to create a pipe using Extrude Along Path as I can with the option from the "Model" menu but after trying several variations I can't get the Extrusion working. Any ideas anyone? After running the following macro I can use the "Model/Extrude Along Path" manually and it creates exactly what I want but I can't find a procedure that works in the macro... procedure Pipe; var h1, h2 : handle; PipeOD, Wall, p1X, p1Y, p1Z, p2X, p2Y, p2Z : real; begin PipeOD := 42.4; Wall := 3.2; Message ('Pick first and last points.'); GetLine3D (p1X, p1Y, p1Z, p2X, p2Y, p2Z, false); Poly3D (p1X, p1Y, p1Z, p2X, p2Y, p2Z); h1 := ConvertToNurbs (LNewObj, false); Oval (-PipeOD/2, PipeOD/2, PipeOD/2, -PipeOD/2); Oval (-PipeOD/2 + Wall, PipeOD/2 - Wall, PipeOD/2 - Wall, -PipeOD/2 + Wall); h2 := LNewObj; ClipSurface (PrevObj (h2), h2); DelObject (h2); { h2 := CreateCustomObjectPath ('Extrude Along Path', h1, LNewObj); } ClrMessage; end; run (Pipe);
  14. OK. Got it... procedure this; var {$Include filename_with_path} begin end; run (this); and then use Notepad or other text editor to edit the filename. Thanks
  15. Just a little more help please. Is this all I put in the script editor? {$Include WonderScript.px} or is it procudure ...; {$Include WonderScript.px} begin end; run (...); or what? Thanks
  16. I've nearly finished writing a macro and now VW tells me I've exceeded my 32000 character length. I'm using VW2014 and I will upgrade to VW2015 64bit if someone can confirm that the 64bit version will allow me to exceed the 32000 character length. If not then does anyone have any tricks to overcome the 32000 character limit? Does this limit include just spaces or can I change some leading format spaces to tabs etc.?
  17. Thanks Guys, lots of good ideas. Hipppothamus - even if I ignore groups, the lines within the groups aren't ignored by VW because they are selected. Miguel - that's a good idea until I have many many lines then the task is too taxing. Pat - thanks that worked a treat.
  18. I want to place text next to each of the lines I have selected to indicate their lengths on my drawing. That's the easy part - done! The problem is that within a group, lines are also selected. When we create a groups we select the items and group them and then deselect the group but the items within the group remain selected. If the lines within the group remain selected then, even though I have not selected the group, these lines also have their lengths placed along side. How can I deselect all objects other than my chosen selected lines? DSelectObj (InObject); doesn't work.
  19. Use to be able to move the radius or diameter text along the radius or diameter line but now we can't. Please bring this feature back since we can move any other dimension text where we like it. Regards
  20. Thanks Ben, There are not enough spaces in the prefix field to move it as far as I want too but the second idea may work. Anyone else with some ideas? I think I will add this to the wish list since I don't know why this is not a common problem for many people. Regards
  21. In VW12 (I think) we use to be able to move the text on a radius dimension but now we can't (currently VW2014). Can anyone tell me if they know of a way to move the text along the radius line since my center-line is not in the printing area and I still want to reference it by just shifting the text onto the page?
  22. Running the following will always produce the list in order from bottom to top. SetName will rename the handle and may be what your looking for. procedure L; var h : handle; i, LC : integer; begin h := FLayer; LC := NumLayers; for i := 1 to LC do begin message (LC, ' ',i, ' ', GetLName (h)); wait (2); h := NextLayer (h); end; end; run (L);
  23. Totally agree + even on my 1920 x 1080 screen resolution I can't see the difference in the icons make a choice. I have re-named them but that's not the point. I could see them in VW2012
  24. Unless someone has a better idea I want to write a macro for two reasons: 1. If I use the ordinate dimension to dimension a piece of material and I have forgotten a point then I have to re-select the zero point and add the new point, then go back and delete the second zero point/dimension. 2. If my ordinate dimension needs to start at 500000 then I want to choose this point first and then continue. My first click won't be 0 but will be 500000. Any ideas?
  25. What function can I use to select the dimension ordinate mode tool in vs macro? Regards
×
×
  • Create New...