Jump to content

Assembly

Member
  • Posts

    430
  • Joined

  • Last visited

Everything posted by Assembly

  1. Does anyone know what is the script function behind the convert to group menu?. I have inserted a custom object in a script. I would like to convert it to a group.
  2. currently I am trying to use the subtractsolid tool to subtract one PIO from another PIO. I have a simple PIO Extrude: ------------ PROCEDURE SetObjectParameter; Begin; SetRField(HObject,ObjectName,'FrameWidth',Num2Str(1,FrameWidth)); SetRField(HObject,ObjectName,'FrameDepth',Num2Str(1,FrameDepth)); SetRField(HObject,ObjectName,'ExtrudeStart',Num2Str(1,ExtrudeStart)); SetRField(HObject,ObjectName,'ExtrudeFinish',Num2Str(1,ExtrudeFinish)); ObjectName:='0 ASHFRAMEPIO'; HObject:= CreateCustomObjectN(ObjectName,0,0,0,False); SetObjectParameter; ------------ Then within Vectorworks I have created a solid box extrusion that intersects the PIO. By using the Subtract Solids function within vectorworks, I am able to subtract the box from the PIO. ---converting the result to a symbol and exporting as vectorscript allows me to see what process vectorworks uses to carry out this procedure. -------------- tempHandle2 := CreateCustomObject('0 ASHFRAMEPIO',0,0,#0.0000000000000d); ResetOrientation3D; Rotate3D(#0.0000000000000d,#-0.0000000000000d,#0.0000000000000d); Move3D(-5020.000000000000909,300.000000000000057,0); Record(LNewObj,'0 ASHFRAMEPIO'); Field(LNewObj,'0 ASHFRAMEPIO','LineLength','1320.000000000000227'); Field(LNewObj,'0 ASHFRAMEPIO','FrameWidth','45'); Field(LNewObj,'0 ASHFRAMEPIO','FrameDepth','90'); Field(LNewObj,'0 ASHFRAMEPIO','WallH','2400'); Field(LNewObj,'0 ASHFRAMEPIO','Spacing','450'); Field(LNewObj,'0 ASHFRAMEPIO','TopPlateFalls','0'); Field(LNewObj,'0 ASHFRAMEPIO','DwangSpacing','800'); BeginXtrd(0,1560.000000000000455); Rect(-4280.000000000000909,900.000000000000227,-3120.000000000000909,-440.000000000000114); EndXtrd; ResetOrientation3D; Rotate3D(#-0.0000000000000d,#0.0000000000000d,#-0.0000000000000d); Move3D(0,0,240.000000000000057); tempHandle1 := LObject; tempHandle := PrevObj(tempHandle1); result := SubtractSolid(tempHandle, tempHandle1, tempHandle2); ResetOrientation3D; Rotate3D(#0.0000000000000d,#-0.0000000000000d,#0.0000000000000d); Move3D(4360.000000000000909,-345.000000000000057,-1155.000000000000227); -------------- My problem is, by simply copying this code to a new vectorscript, the result from the subtraction process returns -20- (meaning a bad input). ---Is there a way through script, to subtractsolid from PIO's? I would like to end up subtracting one PIO from another PIO.
  3. Trying to script view ports. I have managed to create a view port and turn on the current active layer with this snip: ShowLayer:=0; hLayerCurrent:=ActLayer; hLayer:=CreateLayer(LayerNameString,2); hVP:=CreateVP(hLayer); result:=SetVPLayerVisibility(hVP,hLayerCurrent, ShowLayer); How do I cycle the full list of layers to turn on? How do I cycle the full list of classes to turn on?.
  4. Yes the 'child' object is updated by the parent object. If you convert to group, then ungroup you have access to all the child PIOS. I too have played around with the framer tools and used class to search with reasonable result, the framing tool is quite good. But there are a number of process that you go through that have to be repeated when you make change. Example of why I see the potential using child objects as powerful. The tool does not stop with the framing. Create a Simple Fixing Object tool. Create a Fixing object array tool Create a Lining Tool. Include the fixing array. Create a Building paper. Create a Cavity Batten Tool Create a Cladding tool (allow to extend above and below framing) Add fixing array again. Add M12 Bolts at required centers. The line tool now generates the entire population of objects for a wall, that can be Scheduled. 2) Use similar family of tools to create a Floor faming object. 3) Again Roof framing object. Now make a Shed Object. All you need for the shed object is the width, depth, height and roof pitch. This is all the information required for the script. Use a Case to set the framing depths to the Building Code structural requirements. Based on this info the Shed object sets the values for the floor object, wall object, roof object, Now you have the complete modeled of every component that can be scheduled.
  5. while not required for todays script, i know where i can use that- thanks
  6. A few months back I posted some questions about the creating PIO's Inside a PIO. Since upgrading to 2009 this method is working a treat. I see some great potential so I thought it worth sharing. This is what I have done. I have created a base object called Frame3D. This is a simple extrude that creates a piece of timber framing. I created a FrameStud PIO. Which creates a Frame3D Object and rotates it into the stud position. Basis of this method: objectname:='Frame3D'; hobject:= CreateCustomObjectN(objectname,0,0,90,False); SetRField(hobject, objectname,'framewidth',Num2Str(0,framewidth)); SetRField(hobject, objectname,'framedepth',Num2Str(0,framedepth)); SetRField(hobject, objectname,'FrameType','Stud'); A did the same to make a: FramePlatePIO FrameNogPIO I then created a WallFrame PIO (line) that inserts and arrays the: FrameStud FramePlate FrameNog To create a framed wall. Here is the good part. I then create a record that searches for the original Frame3D object (including search inside PIOS) and BINGO I have a full schedule of every piece of framing.
  7. DoMenuTextbyName is not advisable inside PIO.
  8. I'm trying to make a function that works like Hduplicate but for 3D. This is how I think it will work. FUNCTION hDuplicate3D(copyhandle:handle;xoffset,yoffset,zoffset:real):Handle; BEGIN; Copyhandle:=HDuplicate(copyhandle,0,0); Move3DObj(copyhandle,xoffset,yoffset,zoffset); END; How do I get the function to return the handle of the new object?. I want to be able to use in a repeat statement IE REPEAT n:=n+1; Myobjecthandle:=hDuplicate3D(myobjecthandle,0,0,Zspace); UNTIL (N=10)
  9. I used TextWrangler for many moons, it's good. I recommend anyone semi serious about scripting trying the 1 month free trial of BBEdit. The auto text prompt in BBedit makes a huge difference. After my BBEdit trial finished I went back to TextWrangler... after 5mins my card was out and I was back on BBEdit.
  10. I'm trying to create a menu script that will create classes and set the fill attribute to be a hatch. I set up the classes and hatches in a file. I set the classes to use graphic attributes at creation. I have PIO's that set classes of objects inside the PIO. In the file i set up it works a treat. I exported the script and cut and paste the Class creation part into a new menu script. I've tested the menu script, it is successful in adding all the classes, but it does not set the classes to use the hatches. Anyone know how i can set the class to use a hatch?.
  11. I want to create a PlyInSection tool. The process is Draw Rectangle Apply Hatch Rotate Hatch to match rotation of ply. How can I get the rotation of the PIO?. I cant find a function that does it. PS i know I could easily use a loop to draw the lines - My tool is more complex than example.
  12. Does this mean the disk must be mounted first?. Can you clarify. \Volumes\That_Mounted_Disk\This\Folder\Here\VS_Stuff.px Volume:= The_computer_Name; That_Mounted_Disk := The_Disk_Name; This\Folder\Here\VS_Stuff.px := The_Folder_Path; ? Thanks
  13. I've recently discovered the benefits of using BBEDIT and the $INCLUDE function. Thought I would share it for those new to scripting. If your new to scripting I highly recommend you check out BBEDIT. BBEDIT is a text editor. It has Vector-script functions included, as you start typing a procedure name it will give you a pop up of the functions available with a quick insert. Recognized procedures text is displayed blue. 'String' text is pink. This helps avoid those small syntax mistakes that can break a code and take hours to find. http://www.barebones.com/products/bbedit/
  14. Is there a way to set the path in the $INCLUDE to find a file on a network?. I am small office running Mac's no server just linked computers.
  15. I put this post in the general area too, but no one wants to answer. As the VW Guru are usually looking at this area of the Fourm I post here too. I run Vectorworks 2009 on a 2 x 2.8 Quad Core Intel Xeon Machine. I am using a view port to do a radiosity rendering. Lots of crashing so I keep stripping back objects. I check my the OS X activity monitor and find only one of the processors is being used. Does anyone know how VW accesses the processors?. Can it use multiple processors at a time?. if it does how do i make sure my comp is running optimally? if not...WHY NOT???!!!!
  16. all afternoon I've been trying to render a quite complex object. I use the OS X activity monitor to see how vector works uses the computing power. It constantly uses only one of my eight processors. The 'Force Quit Application Window' shows that Vector Works constantly goes is 'not responding'. I am suitably unimpressed if VW can only use 12.5% of my computing power...
  17. I run Vectorworks 2009 on a 2 x 2.8 Quad Core Intel Xeon Machine. I am doing radiosity renderings in a view port. It has been running slowly. I check my activity monitor and find only one of the processors is being used. Does VW access access multiple processors at a time?. if it does how do i make sure my comp is running optimally? if not...WHY NOT???!!!!
  18. Following from another post, I installed text wrangler. How does one use this? Can it be used to debug vscripts?. Do you just use it to format a script and cut and paste it into the Vscript?. Do you go for a separate text file and use $include in the PIO's
  19. the PIO was blank. it had nothing in it. the top of the info pallet, where it tells you what the object is, was void of any note. Miguel, i had updated the PIO's in question, maybe its related.
  20. Thanks Charles... that looks like some fun to figure out. The widget in the link posted looks promising too. My tip for the week is www.weebly.com a free cloud based webdesign / host site. you can see a couple of my 3d rendered details at http://assembly.weebly.com/drawings.html
  21. thanks for the lead in pat. can you post an example of this in action?.
  22. I'm looking though the preference files. I find text files with tab delineated entry that PIO's reference. Is it possible to script so that the popup options for a plugin refer to an external file like this, if so how?.
  23. I'm writing a script for ProfiledMetalSection The width of sheet of profile metal always ends with the trapazoid coming down. Hence the length is determined by the profile shape. I'm using a linear tool so I can stretch the line to the desired length, but I want the code to then set the actual length that works for the profile. I need to be able to use the value to then reset the linelength parameter of the PIO.
  24. Today, for the first time ever, one of my files had problems with my PIO's. The objects 'disapeared' from the file. What I mean by this is: the lines ect were still drawn on the layer, but when I selected the object, the info pallet was blank. It did not say what the object was or what the parameters were. Does anyone know the cause of this serious problem?. Thankfully I have time machine on OSX and was able to go back one day to regen the file befor the problem arose. I think the problem was caused by the file being opened on a computer which did not have the plugins present in the preference file, worked on saved then closed.
×
×
  • Create New...