Jump to content

Worksheet data for thickness, width, length?


Recommended Posts

I'm trying to make worksheet cutting lists for wood project designs. In my worksheet I have columns for height, width, and length using the Functions selections. The problem is height, width, and length do not relate to thickness, width, length of my pieces. Figures are messed up because of how my objects are extruded, and if I have subtracted object from other objects. So what is a way for me to create a useable cut list worksheet?

Link to comment

Bruce, I know you have asked similar questions before. The answer has not changed. VW Worksheets do not have the ability do to what you want and what your brain can do.

 

The only work around I can think of is to make symbols of the parts and then put the symbols onto a "detail layer" so they all match up with the cardinal length/width/height functions and then report on the dimensions from there.

 

Sorry.

Link to comment

Here is where I'm at. I messed with this today. There is no way to make it work using the functions height, width, and length. No matter how I create an object when I rotate it, Vectorworks flops the width and height dimensions, so trying to use that for a cut list worksheet is useless. Then I explored Bryan's suggestions of using records, and yes it can be done, but I'm pretty sure I would spend ten times more time than if I just transpose the dimensions into a Numbers spreadsheet. The solution in Vectorworks would be to allow the user to define which dimensions are thickness, width, length. Until then, the best Vectorworks can do for me is to count parts.435538197_ScreenShot2021-01-31at8_00_02PM.thumb.png.f2152a811b3e59da882fa9051048c957.png37233709_ScreenShot2021-01-31at8_00_19PM.thumb.png.b90562c5cb0ab5ea1b9f57eaed02e02e.png

 

 

Link to comment

Or as I suggested, don't try and make the cut list from the model, but rather put duplicates of the parts on a different layers so that Length/Width/Height to work. You could still get the count by counting the total number of each part and subtracting one for the the one on the "sample" layer.

 

It will work better if they are all symbols.

Link to comment

I understand what you are saying Pat, but again that work is way more time than me just manually creating the cut list, even if I hand write it. Also, symbols do not show their dimensions in the OIP, so they are useless for dimensions. Essentially, Vectorworks is an architect, landscape, and theater tool. Trying to design furniture with it means I have to live in those environments, and it can be difficult at times.

Link to comment

I was able to make the file faster than I thought. It's attached. The goal is to use the object dimensions to create a useable and accurate material cut list (worksheet). I have the embedded worksheet set to count parts only at the moment. Typically a cut list is set up; Key, Part Name, Quantity, Thickness, Width, Length, Material. I can get all but the dimensions to appear correctly in a worksheet. Every object in the drawing is thickness = smallest dimension, width = middle dimension, and length = largest dimension. I appreciate anyone who can help and make this work without adding records or manipulating object orientations. Thanks.

Need A Cutting List.vwx

  • Like 1
Link to comment

My desire to find a way to have Vectorworks create a material cutting list has taught me a lot. Most importantly; it cannot be done efficiently. In fact, all attempts took at least 10x more time than just composing a list manually. I do see the value of worksheets for counting objects and adding together things like lengths of pipe, but Vectorworks is confused by furniture component objects. It does not know which dimension is the thickness and which is the width. Those figures are based on object orientation in the Vectorworks drawing rather than the thickness of a purchased wood board, which is the real dimension. Length is always the extruded length.

Link to comment

Hi Bruce,

 

I've struggled with this over the years as well.   I work with events and exhibit design (I know, tough business these days!) - but my intention is to pull as much information from my models as possible.   I love how changes are reflected in viewports and worksheets.. but there is a struggle to get the correct information pulled out.   I'm going to download your file as well.. I'm curious on your drawing, solutions and, moreso, if we can find a better workflow here.   

 

A few of my attempts are:

- symbol of an extrusion profile that is imported as a group rather than symbol.   The benefit here in profiles is that if I change one piece, the rest of the symbols don't update.   It also controls how many symbols are in my libraries as the possibilities are nearly endless.

- draw panels in top plane, rotate to the correct side, and scale as needed.   I use a lot of infill panels, and this method has worked in the past, and then I can pull some details

- custom records with pull down and text menus.   This lets me ensure that the text is correct.. but prone to human error.   The pull downs let me sort things out while limiting class lists.

- class structure.   if material is on a particular list, that can take away the need for some of the options (plywood 1/4, 1/2, 5/8, 3/4, and so on).   Depending on your work, this can build too many options and the error of having objects in the wrong class is possible.

- symbol design layers.. but that's also double the work and doesn't agree with your model necessarily.

 

I don't have the best workflow yet, but I want a better solution as well.   

Link to comment

I do not think there is a solution to this unless Vectorworks adds an option for the user to define the T, W, and L. I have no idea how that could be added, but I know that would be a solution.

 

@jeff.kisko I've learned the hard way that it's best to wait until the design process is complete before converting components to symbols. It's too hard to get to the dimensions of an object that is a symbol, and that's because Vectorworks does not show the dimensions in the OIP even thought they are there when you drill into the symbol. That is frustrating.

Edited by Bruce Kieffer
Link to comment
  • 4 weeks later...

@Bruce Kieffer I hope you don't mind my using a file you posted as a test.  I have written a worksheet script that returns the unrotated Thickness, Width, and Length of an object. I don't think it is smart enough to handle every possible case, but I thought I would share it in case it is useful.

 

I think it will work for all objects that begin as rectangles that are then extruded to length, regardless of how you rotate them after that. Where I don't think it will work is if you draw a polygon at an angle and extrude that. Think of a side view of a rafter. If you draw a rectangle and extrude and rotate and clip the top and bottom ends vertical it should work. If you use the polygon tool to draw the angles rafter profile and extrude that I don't think it will return the values you are expecting.

 

It is a single script that takes a parameter of 'Length', 'Width', or 'Thick' and will return the appropriate value to that column of a worksheet database.

 

The complete formulas to run the script when it is present in a Script Palette in the drawing are:

 

=RunScript('StockDims', 'Length')

=RunScript('StockDims', 'Width')

=RunScript('StockDims', 'Thick;)

 

The script is included in this post and is also already in the attached file. You can see in the worksheet the values that are being returned for each part.

 

Is This A Cutting List?.vwx  (This is a VW2021 file).

 

Procedure StockDims;
{March 6, 2021}
{©2021 Patrick Stanford pat@coviana.com}
{Licensed under the GNU Lesser General Public License}

{No Warranty Expressed of Implied. Use at your own risk.}

{Likely to return unexpected values for objects created}
{using angled polylines/polygons that are then extruded}

{Return the dimesnsions of the bounding box of an urotated}
{version of the object specified in the database subrow}
{This is a worksheet script and will not operate if run}
{directly from a script palette}

{The format to run the script is:}
{=RunScript('StockDims', 'DimToReturn') where DimToReturn}
{can be a string of 'Length', 'Width', or 'Thick'}

Var		S1:			String;
		L1, W1, H1:	Real;
		LN, WD, TH:	Real;
		Hd1, Hd2: 	Handle;
		R1:			Real;

Function RoundX(N1:Integer; Rn:Real):Real;
{Rounds to the number of decimal places specified by N1}
	Begin
		RoundX:=Round(Rn*10^N1)/(10^N1);
	End;
	
Begin
	{Get the object identified in the database subrow and the L/W/T parameter to return}
	{Convert the parameter to uppercase for later comparison}
	Hd1:=WSScript_GetObject;
	S1:=WSScript_GetPrmStr(0);
	UprString(S1);

	{Duplicate the identified object as a temporary object, Set the Rotation to zero,}
	{get the Height, Width, Lenght parameters}
	{Delete the temporary object}
	Hd2:=CreateDuplicateObject(Hd1, nil);
	SetRot3D(Hd2, 0, 0, 0, 0, 0, 0);
	Get3DInfo(Hd2, H1,W1,L1);
	DelObject(Hd2);

	{Round the values}
	LN:=RoundX(3, Max(Max(H1,W1),L1));
	TH:=RoundX(3, Min(Min(H1,W1),L1));
	WD:=RoundX(3, Max(Min(H1,W1),L1));


	{Set highest value to length, midvalue to width, smallest to thickness}
	{If there is an error return -999}
	If S1 = 'LENGTH' then R1:=LN
	Else
	If S1 = 'WIDTH' then R1:=WD
	Else
	If S1 = 'THICK' then R1:=TH
	Else R1:=-999;
	
	{Return the proper value to the worksheet cell}
	WSScript_SetResReal(R1);
End;

Run(StockDims);

 

Link to comment

Make sure you have the script in the file you want to use the function in. Then enter one of the following formulas in each column.

 

=RunScript('StockDims', 'Length')

=RunScript('StockDims', 'Width')

=RunScript('StockDims', 'Thick;)

 

Or download the file again and the worksheet already had the Runscript functions in the worksheet.

Link to comment

I don't know that a fully automated version will every be possible with all the different ways VW can create objects. But this was a fun project to try and should get you a little closer to what you want/need.

 

I think it should work for any objects that are created  parallel to the axes and then rotated. The starting shape could be a generic solids or and extrude, or probably even an extrude along path. It probably won't work with parts that are originally drawn at an angle.

 

It was just kind of a fun test project. I hope it ends up helping.

Link to comment

Pat, I made a change to the objects to see what happened when I recreated the back-rail-bottom piece to get it's dimensions to show correctly. Doing so caused all of the dimension in the worksheet to disappear. I tried running the script and I checked to be sure the formulas where still entered. What do I need to do to bring the worksheet dimensions back? I attached the modified file here.

 

Is This A Cutting List (3.8.21).vwx

Link to comment

The scripts only run when the worksheet is recalculated. It will also ask (as a security measure) if you want to run the script. I usually select the Always run Scripts options.

 

Once I did those two steps, the worksheet showed everything. But it is still not returning the right values for the back-rail-bottom. It is showing 1.25 x 70 x 70 instead of 1.25 x 2.25 x 70 that it should be showing.

 

It could (is probably) be a script error. I will take a look later today.

Link to comment

Ok. I guess it is later, but not as later as I thought would be later.  ;-)

 

Copy everything in the text block below. Edit the script, delete everything and paste in the revised script. Recalculate the worksheet.

 

I used a different formula to calculate the Width that should work better.

 

Procedure StockDims;
{March 6, 2021}
{©2021 Patrick Stanford pat@coviana.com}
{Licensed under the GNU Lesser General Public License}

{No Warranty Expressed of Implied. Use at your own risk.}

{March 8, 2021 - Updated formual for calculation of width}

{Likely to return unexpected values for objects created}
{using angled polylines/polygons that are then extruded}

{Return the dimesnsions of the bounding box of an urotated}
{version of the object specified in the database subrow}
{This is a worksheet script and will not operate if run}
{directly from a script palette}

{The format to run the script is:}
{=RunScript('StockDims', 'DimToReturn') where DimToReturn}
{can be a string of 'Length', 'Width', or 'Thick'}

Var		S1:			String;
		L1, W1, H1:	Real;
		LN, WD, TH:	Real;
		Hd1, Hd2: 	Handle;
		R1:			Real;

Function RoundX(N1:Integer; Rn:Real):Real;
{Rounds to the number of decimal places specified by N1}
	Begin
		RoundX:=Round(Rn*10^N1)/(10^N1);
	End;
	
Begin
	{Get the object identified in the database subrow and the L/W/T parameter to return}
	{Convert the parameter to uppercase for later comparison}
	Hd1:=WSScript_GetObject;
	S1:=WSScript_GetPrmStr(0);
	UprString(S1);

	{Duplicate the identified object as a temporary object, Set the Rotation to zero,}
	{get the Height, Width, Lenght parameters}
	{Delete the temporary object}
	Hd2:=CreateDuplicateObject(Hd1, nil);
	SetRot3D(Hd2, 0, 0, 0, 0, 0, 0);
	Get3DInfo(Hd2, H1,W1,L1);
	DelObject(Hd2);

	{Round the values}
	LN:=RoundX(3, Max(Max(H1,W1),L1));
	TH:=RoundX(3, Min(Min(H1,W1),L1));
	WD:=RoundX(3, (H1+W1+L1-LN-TH));


	{Set highest value to length, midvalue to width, smallest to thickness}
	{If there is an error return -999}
	If S1 = 'LENGTH' then R1:=LN
	Else
	If S1 = 'WIDTH' then R1:=WD
	Else
	If S1 = 'THICK' then R1:=TH
	Else R1:=-999;
	
	{Return the proper value to the worksheet cell}
	WSScript_SetResReal(R1);
End;

Run(StockDims);

 

Link to comment

Pat, the script is working well. I have rebuilt the pieces that were display incorrect dimensions, and they are working now. Your cautions about how to create the objects, and when to rotate are true. It does not seem to matter which plane the 2D object is extruded into. So far they all dimension correctly in the scripted worksheet.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...