Jump to content

MullinRJ

Member
  • Posts

    2,007
  • Joined

  • Last visited

Everything posted by MullinRJ

  1. How are you importing the data? What format is it in?
  2. 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
  3. 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
  4. AD =? Autodesk, just guessing. Raymond
  5. Oh, good. The timing was such that I though your post was erased accidentally.
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. Or try turning off all snap constraints before GetPoint, then turn them back on when done. Raymond
  14. 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
  15. 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
  16. 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
  17. Hi Charles, ???I would hope DEEP meant FEIOL would crawl into Folders as they are just another container type, but I don't know off the top of my head. Will check tomorrow. Zzzzzzz time now. Raymond
  18. Hi Pat, ???I believe my second FEOIL(ist) will look inside Symbols adequately, but I don't think my code will modify any PIOs containing text. They may need to be done manually, or with some knowledge which PIOs are used. ???I modified the function ChangeFont to test for text objects, an omission resulting from having a good thought and not acting on it before it evaporated. ???One assumption my code makes is that it judges the Font Face of a text block by its first character. If you mix Font Faces inside text blocks, then the code will need to be modified to check each character in each text block for the old font and change it accordingly. Not hard, just a little more tedious. Raymond
  19. Hi Matt, ???Actually, it's VS 102 and the fastest way to learn it is by example. This is untested code, so try it on a test file first and I'm sure you can make it work. It's a basic template you can use to make global changes to files and you can get as specific as you want with your matching criteria just by changing the logic in called function (ChangeFont, in this example). Raymond PROCEDURE SwapFonts; { Change the Font Face of every text object in a file. } { 09 Sept 09 - Raymond J Mullin } CONST Font0 = 'Tekton Pro'; Font1 = 'Tekton'; VAR H :Handle; FID0, FID1 :Integer; function ChangeFont(H :Handle) :Boolean; Var FID :Integer; Begin if (GetType(H) = 10) then begin FID := GetTextFont(H, 0); { font ID of text object - first character } if (FID = FID0) then SetTextFont(H, 0, len(GetText(H)), FID1); end; { if GetType } End; { ChangeFont } BEGIN FID0 := GetFontID(Font0); { original Font ID } FID1 := GetFontID(Font1); { new Font ID } ForEachObjectInLayer(ChangeFont, 0, 2, 1); { All objects, Deep, All layers } ForEachObjectInList(ChangeFont, 0, 2, FSymDef); { All objects, Deep, All symbol definitions } Sysbeep; { beep when done } END; Run(SwapFonts);
  20. orso, Though all you say is true, knowing these shortcomings, one can program around the problems, or avoid them altogether. Even partially impaired, the function works for a majority of cases. For my own uses, the function works quite well enough and I would not avoid using it. I don't think any of the problems are critical enough to not recommend it. Just use it with caution - Caveat Scriptor. Raymond
  21. This is what you want to use. filename := GetFPathName;??????{ poorly documented function } There is some info on this function here: http://developer.vectorworks.net/index.php?title=VS:GetFPathName HTH, Raymond
  22. Hi Jack, ???This won't do exactly what you want, but it will compile, it will run and it will show the values it collects. Raymond PROCEDURE xxx; CONST ??????CR = chr(13);??????{ Carriage Return } VAR ??????dateValue, filename, fullReadPath, fullWritePath :String; ??????readFileExists, writeFileExists, locked, hasReadPermission, hasWritePermission, hasFolderPermission :Boolean; ??????vMaj, vMin, vMai, vPlat :Integer; BEGIN ??????dateValue := Date(1, 0);??????{ Abbreviated Date, Date Only } ??????GetFile(filename); ??????GetFileInfo(filename, fullReadPath, fullWritePath, ????????????????????????readFileExists, writeFileExists, locked, hasReadPermission, hasWritePermission, hasFolderPermission); ??????GetVersion(vMaj, vMin, vMai, vPlat); ??????AlrtDialog(concat(dateValue, CR, 'Major = ', vMaj, ' Minor = ', vMin, ' Maintenance = ', vMai, ' Platform = ', vPlat)); ??????AlrtDialog(concat(filename, CR, fullReadPath, CR, fullWritePath, CR, readFileExists, ' ', writeFileExists, ' ', locked, ' ', hasReadPermission, ' ', hasWritePermission, ' ', hasFolderPermission)); END; Run(xxx);
×
×
  • Create New...