Jump to content

MullinRJ

Member
  • Posts

    1,987
  • Joined

  • Last visited

Everything posted by MullinRJ

  1. It might. :whistle: You're welcome. Raymond
  2. Nicholas, ???Here is a short script that will return the length of one 2-vertex 3D Poly. Of course, a favorite program of mine will do the same and a whole lot more. ;-) ???If you are looking for the length of all selected Polys, that's easy, too. PROCEDURE Length3DLine; VAR P0, P1 :Vector; BEGIN GetPolyPt3D(FSActLayer, 0, P0.x, P0.y, P0.z); GetPolyPt3D(FSActLayer, 1, P1.x, P1.y, P1.z); Message(Norm(P1-P0)); { Length of vector between 2 points } END; Run(Length3DLine); Happy New Year, Raymond
  3. After answering a question yesterday about the constants for the Interactive Settings in the VW Preferences I realized it would be nice if the entire VW Preference Dialog were annotated the same way. It's been a while since I posted anything, so here is a small year end gift. The majority of the constants can be read with GetPref() and SetPref() as boolean values - anything with a checkbox or radio button is typically a boolean value. The PopUp menus and the Sliders with integer values can be accessed with GetPrefInt() and SetPrefInt(). The Sliders with decimal values and the Text fields that take distance or time entries can be accessed with GetPrefReal() and SetPrefReal(). These functions are described in the VectorScript Function Reference that ships with the VW software (most of the time), or online at NNA's download page. If any of the data in this post is incorrect, please contact me (PM) and I will correct and reload the file. Happy New Year, everyone. Raymond
  4. As I said, I haven't played with this, but you mention Foreground Render Type => GetObjectVariableInt(H, 1036). Have you looked at the VS Function Reference Appendix? In the middle, under Viewports, there are a slew of constants that access veiwport settings. I apologize that I assumed you knew about it if you did not. There is an online version and a downloadable version. There should also be one in the VWHelp folder in your VW application folder, but some have posted they don't have that. On the page you cited: http://www.nemetschek.net/support/custom/vscript/docs.php, the last link is the downloadable version of said VSFuncRef. It is working. When using the object variable calls, be careful of data type. There are boolean, integer, longinteger, real, and string versions of Get and SetObjectVariableXXX() - where XXX is the type of the call. If you use the wrong type, you will still get data out, but it will be meaningless. In the function reference appendix, the types are listed after the constants. Happy hunting. Raymond
  5. I haven't played with this but you might try "value := GetObjectVariableInt(H, 1001);". See what values it returns for viewports with different rendering setting. If they vary, then try "SetObjectVariableInt(H, 1001, value);" to see if that is what you are after. Raymond
  6. You are welcome, Highpass Petri, your woods are lovely, dark and deep. Raymond
  7. Use Move3DObj(0, 0, dZ); to move an individual object. To generate a random value between to numbers, use the following function: function RandVal(LL, UL :Real) :Real; { Generate a random value in the range LL -> UL inclusive. } Begin UL := UL - LL; RandVal := Random * UL + LL; End; { RandVal } By sending the appropriate limits to the RandVal function you can control whether your objects move up or down. Raymond
  8. How are you importing the data? What format is it in?
  9. Hi Justin, ???If you are going to create multiple copies and want to get at their handles after your repeat loop executes, you'll probably want to save them as you create them. Try something like this: VAR ???HArray = DynArray [ ] of Handle; ... Cnt := 10; Allocate HArray[0..Cnt]; n := 0; HArray[n] := MyObjectHandle;???{ element 0 holds handle to original } REPEAT ???n := n + 1; ???HArray[n] := hDuplicate3D(HArray[n-1], 0, 0, Zspace); UNTIL (n = Cnt); Raymond
  10. I was able to create arcs tangential to other arcs easily by 1) setting the Tangent Constraint ON (R key), and 2) using the third Arc drawing mode (Arc by Tangent) for the second arc. You can draw the first arc any way you like. After you finish drawing the second arc, adjust the start/end point of the first arc to coincide with the second arc and the two curves will look as one. If you need to make two existing arcs with fixed centers, tangential by adjusting the radius of one or both, then draw a line between their centers. The tangential point of two arcs will always be on that line. Adjust a radius, or both radii, to a point on that line then adjust the start/end points on your arc(s) to that point. They will then be tangential to each other. HTH, Raymond
  11. AD =? Autodesk, just guessing. Raymond
  12. Oh, good. The timing was such that I though your post was erased accidentally.
  13. Nice find. So, it's not a bug. That preference is an override for fill behind Text objects that predated Class Attributes. It still works as it was originally implemented and I use it all the time. It only affects text as it is created. You can turn it off in your script with: SetPref(8, False); or toggle it with another one line script: SetPref(8, not GetPref(8)); Raymond
  14. To the Moderator(s), ???There was a post between my post (131369) and SamIWas' post (131366). It was posted 22 minutes after 131366, but I don't know whose it was. ???I hit the Reply button at the bottom of 131366 and when I hit Submit, the previous post disappeared. I don't know if the original poster deleted it or if it vanished as a result of the way I replied. Can you tell me if it was removed legitimately? This post is submitted using the Quick Reply pane at the bottom of the page. Thanks, Raymond
  15. I haven't tried all the tool calls, but FPatByClass works for other tools like the Rectangle and Arc tools, but not for the Text tool. This appears to be a bug. Have you submitted a but report? Raymond
  16. Hi Peter, ???I'd have joined sooner, but I've been out and about this last week; only now catching up. ???I think your first method should work. FEOIList will start at the handle passed to it and walk to the end of that list, so yes, you can start in the middle of a list. ???There is a separate object list for each layer. This might be the biggest stumbling block in your first attempt. You will have to get a handle to the last object on each layer you are working on and traverse each list from there to the end. You won't need to use LNewObj as each list on each layer will terminate with NIL when you get to the end. It wouldn't work anyway since LNewObj covers the whole document (when it works) and isn't unique for each layer. ???You might consider building a DynArray of "last object" handles for your visible layers and save the last object of each layer in each element. Step through your visible layers and store LActLayer in your array before you create anything new, then step through the array and process all new objects after the stored "last object" handles. ???One other thing, LObject does not get the handle to the last object created or placed, but to last object that would be drawn when all layers and objects are visible. That is, the last (top) object on the last (top) layer. If that layer or object is not visible, LObject will still return the same handle. Think of it as the last object in the stacking order of all layers and placed objects. Since Sheet Layers are above Design Layers, in layer stacking order, if you have sheet layers with objects on them LObject will be coming from the top sheet layer. Very tricky is this document handling stuff. HTH, Raymond
  17. I notice you have a scroll bar at the top of your tool palette image. What appears if you scroll it to the right? Raymond
  18. Hi Jeff, ???There is a limit to ID numbers in Modern Dialogs, but I don't know where it's documented, if at all. I think it was posted once, but it's an arbitrary value, and if I recall correctly the value was 400, 3-400 to be more precise, where 1 & 2 are reserved for the OK and Cancel button ID #'s. Other values are used internally by NNA. ???You can test for the limit pretty easily with a dummy dialog and increase the number of an item until it fails. I don't know if the limit value changes between versions so test that, too. If you're feeling really generous, you can post your results here. ;-) Raymond
  19. This KBase article doesn't recommend it, but it doesn't say NO, either. You might give it a try. Vectorworks 2009 System Recommendations Raymond
  20. Or try turning off all snap constraints before GetPoint, then turn them back on when done. Raymond
  21. Nathan, ???What type face? If you'd like help converting a font to TrueType, send me a PM (click on my name for a sub-menu) and I'll see if I can help. Raymond
  22. Another way, yes there is almost always another way, is after you've drawn it on the floor, go to a side view (Front, Left, Right or Back) so you are looking at one end of it and use the menu command Rotate>Rotate Left 90? (CMD-L). This will spin it around its center. Quicker than the rotate tool for 90? spins. While in this view you can also move it up to its proper Z height with the 2D Move command (CMD-M, hint: Y Offset is now in the Z direction) and when you go back to TOP view you can position it in X & Y. Yes, there are still other ways, but I don't want to use my monthly plug just yet. Raymond
  23. Matt, Are you sure the font names are spelled correctly? Very important! This script worked in a test file I created to change Helvetica to Calibri. Try this one line script on a selected text block to check its Font Name spelling as compared to the name shown in the Font Menu name. They should be the same, but if not, try the name in the message window. message('Font ID = ', GetTextFont(FSActLayer, 0), ' Font name = ', GetFontName(GetTextFont(FSActLayer, 0))); If the name is blank, you aren't getting a good Font ID because the font isn't recognized in VW. If the number returned is -1, then the FontID is not being found. You may have to use VW12.5 to prepare the template files with this script and then reconvert the files to VW 2009. Raymond
×
×
  • Create New...