Jump to content
michaelk

Cabinet and Countertop Scripts

Recommended Posts

I'm posting a couple of scripts that I've found useful when dealing with cabinets and countertops. I've been using them in a more hacky way for a while and just recently, (Thanks Patrick, Marissa, Hippocode, and Raymond!) made them more presentable. Still pretty ham-fisted coding, but it works!

If there is any interest in them I may make a prettier version with dialog boxes.

But first let's see if there is any interest.

It started with a wish list for a graphic way to insert cabinets.

These scripts will insert cabinets between two clicks. Just run one of the scripts, click a starting point and click an ending point. The script will insert cabinets on the "left" side of the line between the two clicks. Think of it as going counter clockwise around a room.

There are different versions:

Fast Base Cabinets +18,24,36 will insert base cabinets with a standard width (18, 24, 36 inches) and one more to fill in the remaining distance, if any. It will also create a countertop floor object on top.

Fast Base Cabinets 1,2,3,4,5 creates 1,2,3,4, or 5 base cabinets of equal length.

Fast Upper Cabinets +18,24,36 does the same thing for upper cabinets.

Fast Upper Cabinets 1,2,3,4,5 does the same thing for upper cabinets.

Fast Countertop creates just a countertop. I often find it helpful to separate this step. (You can turn off countertops in the Fast Base Cabinet scripts by changing the value for WouldYouLikeACountertopWithThat from TRUE to FALSE.)

The parameters are easily editable to your own taste.

I think these scripts should work back to 2014. Please let me know if there are any issues.

These scripts assume Imperial dimensions in inches. Metric users can change the default values in the declarations after the Procedures SetCabinetParameters and LastSetCabinetParameters.

mk

Share this post


Link to post
On 7/15/2016 at 11:03 PM, michaelk said:

I'm posting a couple of scripts that I've found useful when dealing with cabinets and countertops. I've been using them in a more hacky way for a while and just recently, (Thanks Patrick, Marissa, Hippocode, and Raymond!) made them more presentable. Still pretty ham-fisted coding, but it works!

If there is any interest in them I may make a prettier version with dialog boxes.

But first let's see if there is any interest.

It started with a wish list for a graphic way to insert cabinets.

These scripts will insert cabinets between two clicks. Just run one of the scripts, click a starting point and click an ending point. The script will insert cabinets on the "left" side of the line between the two clicks. Think of it as going counter clockwise around a room.

There are different versions:

Fast Base Cabinets +18,24,36 will insert base cabinets with a standard width (18, 24, 36 inches) and one more to fill in the remaining distance, if any. It will also create a countertop floor object on top.

Fast Base Cabinets 1,2,3,4,5 creates 1,2,3,4, or 5 base cabinets of equal length.

Fast Upper Cabinets +18,24,36 does the same thing for upper cabinets.

Fast Upper Cabinets 1,2,3,4,5 does the same thing for upper cabinets.

Fast Countertop creates just a countertop. I often find it helpful to separate this step. (You can turn off countertops in the Fast Base Cabinet scripts by changing the value for WouldYouLikeACountertopWithThat from TRUE to FALSE.)

The parameters are easily editable to your own taste.

I think these scripts should work back to 2014. Please let me know if there are any issues.

These scripts assume Imperial dimensions in inches. Metric users can change the default values in the declarations after the Procedures SetCabinetParameters and LastSetCabinetParameters.

mk

 

Hi Michael,

 

Where would i find the Cabinet scripts you wrote about? Would LOVE to try them out!

 

Thanks

 

Alan

Share this post


Link to post

Alan

 

I'll post the 2016 version.  

 

Something changed in 2017 so that the cabinets offset one cabinet from the points the user clicked.  Not sure why - I haven't had time to get into it.  Maybe one of the VS geniuses will help me out with that?

 

@JimWany news as to when uploads to the old forum will be restored to the new forum?

 

Hope this works for you.  Double click a script from the palette and then click two points on the drawing.  Cabinets will be drawn between those two points on the left side of an imaginary line connecting those points.  If you are clicking on top of already drawn walls make sure Wall Insertion Mode is off.  Otherwise some of the cabinets will be sucked into the wall.  The results are not predictable :-)

 

 

hth

 

 

mk

Cabinet Scripts~.vwx

  • Like 1

Share this post


Link to post

@michaelkNot so far, but it isn't forgotten, it may take until the second wave of forum upgrades though which I'm a good portion of the way through now.

Share this post


Link to post

Glad they work for you.

 

I find them helpful for quick layouts.  When I get time I'll make it do corners and fancy stuff.  

 

The scripts are in the resource browser.  Just import them like any other resource.

 

It might help to also copy and paste a set of cabinets from the sample drawing into your drawing so that the textures and cabinet hardware also follow.

 

 

mk

Share this post


Link to post

I don't think anyone (besides me :)) is actually using these, but just in case -  here is the 2017 update to the cabinet scripts.

 

Now the script works the opposite direction from the 2016 version.  In 2017 draw this script clockwise around the room.  The cabinets and countertops will appear on the right side of the line.

 

 

mk

Cabinet Scripts Update~ v2017.vwx

  • Like 1

Share this post


Link to post

Love the script but I do have a question.  Do you know why the countertop does not have the correct texture in VW 2019

Share this post


Link to post

NO!  And it bugs me, too.!

 

I’m assuming that either something changed in texture on floor objects that I need to account for in the script or there is a bug in floor objects in 2019. 

  • Like 1

Share this post


Link to post
Posted (edited)

Could the "BeginFloor" command be replaced with a simple extrude?  

 

If you ungroup the floor, it becomes a floor and a rectangle.  At this time the floor can be rendered by setting the correct attributes. 

Edited by The Hamma

Share this post


Link to post

The problem with an extrude is that it shows up as wireframe in top/plan view.  Then you see all the lines between the base cabinets - which is the one of the reasons I don't use the built in countertop.

 

I just looked at the differences between floor since 2018 and 2019.  I think it's a bug.  The work around is to force a redraw.  Changing a render parameter like the mapping or the scale instantly makes it work in 2019.

 

I'll submit a bug report when I get home and, in the mean time, I'll try scripting a forced redraw to see if that fixes it.

 

Thanks for pointing it out.  I see it almost everyday and think, "I should figure out why that doesn't work anymore" 🤓

Share this post


Link to post

Interesting.

 

In both 2018 and 2019 if you take a floor object and Convert to Group you get 6 3D polygons.

 

In 2018 if you take a floor object and Ungroup you get the original polygon.

 

1n 2019 if you take a floor object and Ungroup you get the original polygon, a floor object and a group containing the original shape as a polyline.  That object is sometimes not selectable.

Share this post


Link to post

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.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...