Jump to content

James Russell

Member
  • Posts

    394
  • Joined

  • Last visited

Everything posted by James Russell

  1. Attempting a script that searches my lighting devices and finds the ones rotated less than 180 degrees and applies my second label legend. This is what I have thus far: Procedure Loop; Procedure RotTest; VAR h :handle; rot :integer; BEGIN SetSelect(h); rot:= GetSymRot(h); If rot<180 THEN BEGIN SetRField(h,'Lighting Device','Use Legend','Legend Rotated'); End; END; BEGIN ForEachObjectInLayer(RotTest, 2, 0, 4); END; RUN (Loop); I get a Boolean error and I am unsure why. Any advice/better solutions? Much appreciated, J
  2. Terry, I believe you're talking about the print margins set in Page Setup. Go to Page Setup in the File menu and then select Printer Setup. In the Paper Size drop down you can manage sizes and see the border settings for this document. If you have chosen a different page setup or page size this might't occur. Hope that's somewhat helpful. J
  3. Hey all, I was asked a question by a colleague today that I didn't have an answer to and thought you all might. If I have a viewport and it has (as an example) 12 layers visible. I then import something from Autocad and this places another 50 layers in my drawing. I go through these layers, turn some on and off and find what I need. Is there a way to merge the active layers and the layers I already have active in my viewport without writing them down and then turning them on/off manually? Over several viewports this could be ridiculously tedious. J
  4. Stop the clock, =Perim works on my new simplified Lighting Position Object, that's amazing!
  5. Miguel, Thanks for your reply. I've been playing a bit with this and stripped right back what you've written to what I think is the working bear basics. I've attached my example file for anyone who'd like a look and possible can solve, why this doesn't return a value. Procedure Pobj; VAR objInSym :Handle; Pval :Integer; BEGIN SetActSymbol('1'); objInSym:= FInSymDef(ActSymDef); Pval := Perim(objInSym); message(Pval); END; Run (Pobj); Also I'm a little lost on another part of this which is loop lookups. The SetActSymbol(*) will eventually for me need to be a lookup for all Lighting Position objects and then take each of the 'Light Position Obj'.'Symbol Name' from them and then the above procedure each of those and save the values into a record attached to the Lighting Position Obj the symbol came from. I'll attempt to write a basic layout: Criteria=Lighting Device First Lighting Device Take the Symbol Name of Lighting Device Inside this Symbol take the Perimeter of the object Save this value to a Record on the Lighting Device Next Lighting Device until NIL I just don't have the skills to do this kind of lookup loop, if someone could write a semi annotated procedure on this I'd be very appreciative. And if you've read this far, thanks. J
  6. Raymond, That's exactly what it needed, thankyou. J
  7. Also so you all have an idea on where this is heading the lighting positions are track which is generated by a previous script, to be calculated in a linear meterage. We're attempting to have vectorworks calculate totals and round them to meter or 4mt pieces eventually, but just pulling the perimeter value is the first step. Cheers, J
  8. Hey all, Attempting to make a worksheet at the moment, summarising my Lighting Positions. Just generated a standard report listing my lighting positions, all good. Each of the lighting positions is made from a polyline, multiple points and a perimeter shown in the object info. Also all good and happy. So here's the catch, the worksheet shows the lighting positions, one of the fields has ='light position obj'.'symbol name' returning the symbol name. I then somehow next to this field (preferably) need to have the perimeter value of the line within the symbol mentioned in the previous cell. Any ideas? Might be able get a script to return the value into a record attached to the object and then reference this but it seems like a long work around and I don't have a way as yet of getting a handle on an object in a symbol. J
  9. Just found this set of posts: http://techboard.nemetschek.net/ubbthreads.php?ubb=showflat&Number=135516&Searchpage=1&Main=27782&Words=%2Bposition+%2Bsummary&Search=true#Post135516 I attempted a reselect and the DoMenuTextByName('Refresh Instruments',0); but no result. J
  10. Thankyou both or your help, the DoMenuTextByName command is awesome, perfect some would say. The only issue I'm having which feels like a bug is when the convert to light position is done, the object becomes unselectable, try the script below if you have spotlight. Procedure CustTool; VAR Name:STRING; Result:BOOLEAN; BEGIN PushAttrs; CallTool(-203); PopAttrs; DoMenuTextByName('Convert to Light Position',0); END; Run(CustTool); It should let you draw a rectangle and then convert it to a light position. I find I cannot select the object only the label handle. When I touch this or nudge the object it returns to normal. I tried a Hmove on it by a fraction but to no avail. Frustratingly close, does anyone else have this? J
  11. Maarten, Thankyou, you are correct, twice was the generated output from the custom tool creation script, and the colour was just something I chose from the palette at random. I placed: DSelectAll; h:=PrevObj(PrevObj(LObject)); SetSelect(h); after the Popattrs; and added h:Handle; to the VAR as I thought it should go but once the double polygon is finished being drawn all three polygons are still selected. Even if I can just look within these three polygons for the one where pen colour=null and that becomes selected. The Convert to Lighting Position Object could be a manual menu job if necessary. I'll keep playing but any input is much appreciated. Cheers, James
  12. Hi all, I'm trying to create a new tool for use in our new template. I've been playing with the create custom tool scripts for a while but I am not able to get the result that I want at the moment. Basically I would like a tool that creates a double line polygon with three components, 30mm as the overall width, broken into two fills, a black fill for 20mm and a 10mm fill in red, see attached pic for details on that part. Using the existing custom create a tool I have this script: Procedure CustTool; VAR Name:STRING; Result:BOOLEAN; BEGIN PushAttrs; Result := DeleteAllDLComponents; Result := InsertNewDLComponent(1, 20, 1, 0, 2, 2, 2); Result := SetDLComponentName(1, 'BLACK'); Result := SetDLComponentClass(1, 0); Result := SetDLComponentFillColors(1, 257, 257); Result := SetDLComponentPenColors(1, 257, 256, 257, 256); Result := SetDLComponentUseFillClassAttr(1, FALSE); Result := SetDLComponentUsePenClassAttr(1, FALSE, FALSE); Result := InsertNewDLComponent(2, 10, 1, 2, 0, 2, 2); Result := SetDLComponentName(2, 'RED'); Result := SetDLComponentClass(2, 0); Result := SetDLComponentFillColors(2, 257, 1251); Result := SetDLComponentPenColors(2, 257, 256, 257, 256); Result := SetDLComponentUseFillClassAttr(2, FALSE); Result := SetDLComponentUsePenClassAttr(2, FALSE, FALSE); SetDLSeparation(30); SetDLControlOffset(0); SetDLOptions(1); CallTool(-218); CallTool(-218); PopAttrs; END; Run(CustTool); This works very well for the first part of my little project. The resultant is 3 polygons (as expected), black, red and white. Now for the tricky part. On completion of drawing the polygons I would like it to select the white polygon and convert it into a Lighting Position Object. Anyone? It's probably a line like get selected object white convert to lighting position object, but I really don't know the syntax on that. Any help much appreciated. Cheers, James
  13. Zomgod, I want my next desk to be made of it.
  14. Dworks, Thanks for the tip, I'm playing around with alignment and movement scripts at the moment. Unfortunately it won't help here as we are working with the VAA titleblocks, meaning the alterations would have to occur in the template file, which would alter it for other things and that just causes problems everywhere! It would just be nice if you could link spacing of text fields to each other. If the the field expanded or wrapped the items above or below would shift accordingly. Grrrr. Thanks, J
  15. It's also the same for Lighting Position Objects that I would like to have predetermined costing data for,
  16. I have two records attached to my lighting devices currently, the standard Light Info Record containing all the regular jazz (Position, Wattage, Lamp Type, etc.) and a Costing Record which I am using for supplier and cost data. Inside the symbol I am adding data just the same as I have with the Light Info Record to the costing data. Upon insertion of the lamp the costing data is wiped! I can only presume when the script for the on insertion of the lighting device happens it clears all data from the other records. Anyone else replicate/solve this? Cheers, James
  17. Just wondering if anyone might have a solution for this. I'm currently rebuilding out design template at work and wanting to have a series of text fields that will shift according to a previous item. In the example attached I have a Project Name, Author and Date fields arranged the way I would prefer them to look for the time being with "-" between them as static text fields. All is well if this was the only text here but if I alter the Project Name to something longer it will, as expected, run over the other fields. I was wondering if anyone has solved this problem, possibly with constraints? It would be a nice fix for me. Cheers, James
  18. Jed, The best way that I find to bring images into the 3D environment is to use image props. Just have a look through the help index or a quick youtube search if you haven't used them before. Using crossed planes you can make an image appear the same from a front/back and a left/right perspective, or use the rotate to viewer function to make it appear the same from any perspective. Hope that helps, J
  19. Filemaker is another option we have here, it just would have been nice because a lot of our price lists come in as .xls. I guess I could always convert them across. Any ideas why the ODBC doesn't work? Is it functioning at all? Cheers, J
  20. Hi all, So I've downloaded the demo of 2011 to test as an update for our current 2010, mainly for the ODBC options which would increase our productivity like crazy. Naturally lept straight in without having set up one of these databases before. Made a few objects with a record with a few fields, opened up excel, make up some data relating to the fields, straight forward logic. Now I've hit the wall, open database connection... and then? After much forum surfing and browsing many many pages of help I just want someone to say step by step what to do. Do I need MySQL or a magic driver or enable something in my excel document or write a line of code in the ODBC administrator? Quite at a loss, might be a big ask for a step by step but even just a link to something useful. Cheers, James
  21. I am currently having a slight argument with vectorworks. I am using the SetWSCellTopBorder and SetWSCellBottomBorder function successfully to help with a very large worksheet I have been scripting for ages. The one problem I have it that I want the SetWSCellTopBorder to only apply to the first sub-cell in a lookup not each subsequent one. I thought I would be crafty and use the SetWSCellBottomBorder on the cell above the repeat line but alas this is also a series of sub-cells meaning I would need the SetWSCellBottomBorder to apply to the last of those. Anyone know of a SetWSSubCellTopBorder or equivalent? J
  22. Oh, well that's a shame. I'm going to attempt a script to transfer data for me from the old record data to the new record format I've set up tonight. If you're reading this and have an idea that might help this process let me know. Thanks for the info Kevin! J
  23. Kevin, If I entered my additional data fields into the 'light info record M' as apposed to the regular 'light info record' will it still change the required fields? And would this bring me any difficulties? I'm just thinking that if i have to compromise to import regular fixtures I may as well only loose the metric weight and frame size data with my old lamps as apposed to the large amount of fields in 'light info record'. J
  24. Mmm, I hit this problem late last night. Just wondering if anyone knows if you can add an addition light info record and make it relate to the lighting device? The light info record metric is a good example, will things with the prefix 'light info record' or something like that just automatically be assigned? Hmmmm, James
×
×
  • Create New...