Jump to content

Quick Schematic Create Viewport


Recommended Posts

Hi again,

Another feature request!

 

Would it be possible to create viewports from a schematic layer by selecting the items you want to include in the viewport and click create viewport (I have a shortcut CTRL+SHIFT+V).

 

This would be instead of having to create a rectangle and then using that as the crop border.

 

It may require a degree of crop 'margin' )say one or two grid squares or may be a %age of the length/width to give some space around the objects being cropped nicely, and the viewport laying on the sheet layer centred 🙂

 

But this would speed things up nicely !!

 

Thanks as always,

R

 

 

 

Link to comment
  • 3 weeks later...

@Jesse Cogswell.

Thank you so much for this script - it works a treat.

 

Only feedback I have is that the viewport is placed away from the sheet layer (page) origin. if the x/y could default to 0,0 that would be great. But otherwise, this has saved me so much time. ( have done lots of viewports i bulk, and just gone into the navigator and set the x/y coords for all the viewports to 0, in one go (a great feature of VW!)

 

 

 

Link to comment

@Ross McLee Hmmm.  The script should center the viewport for you.  When viewports are created, they are created in relation to the existing page center on the design layer.  I'll look back at this script when I get some time, maybe I don't have it read in the existing page location.  It certainly centered the viewports in my testing.

 

Ah, just tried playing around with it.  It gets screwed up if your User Origin is different than the Internal Origin.  If you run Tools-Origin-User Origin and select Set User Origin to Internal Origin, this should correct this.  This is a big pain point I have with Vectorworks, as the Internal Origin is poorly explained but is what the GetOrigin VS command references.  A lot of draftspeople start a drawing without regard to the Internal Origin, then set a User Origin later.  There is no direct coding in VS to get the User Origin, you instead have to use a GetPrefReal(6702) and GetPrefReal(6703) and convert the units.  So, if I'm feeling lazy and writing scripts for free, I tend not to put that scripting in.  After I started scripting, every single one of my drawings is very cognizant of where the Internal Origin lands, usually on CL-PL intersection.

 

When I get a moment, I'll add in the scripting to compensate for the User Origin, but that will probably be in a couple of days.

Link to comment
  • 2 years later...

hi
just stumbled in here as I am facing a similar question/task.

I have an imported ifc-file with about 800 ifc-space objects. these should each be placed as a separate viewport on a layout layer with matching scale. these should be named to match the room number.

the selection of the rooms should run via attached database with an entry as criterion. 

the sheet format, the database and the entry of the criterion should be disbursable in a dialog.
has there ever been something like this or is my thinking too far away.

looking forward to input and feedback

 

Link to comment

This sounds like to could be scriptable.  But you are probably looking at 5-15 hours of programming time to get it right.

 

Questions:

1. You need to do this in VW2017?

2. How are the IFC-space objects distributed? Are they all next to each other or are they spread out?

3. Are the IFC objects all rectangular or are they interlocked like puzzle pieces? This will make a big difference in making crop objects. Especially if you don't want any overlap of other spaces in the viewport.

I just looked at the function reference, and there does not appear to be an easy way to get the object associated with a worksheet database subrow. So is there a column in the database that is unique for each object? You will have to get that value from the database and then find the object that has that same value.

 

I have no idea what you mean by "the sheet format, the database and the entry of the criterion should be disbursable in a dialog."

 

Do you have any funds to pay for this or are you hoping for a freebie?

Link to comment

@Pat Stanford i am more than happy having you monitoring all parts of the forum 😉

 

i came up with this task because i found this post.  

 

1. absolutely not. vw2023.

2. It looks like a normal office building with 6 stories. 

3. both. puzzle and nice and clean. there is no need the border fits the exact layout of the room. a rectangle would do the job.

 

i will not need all rooms. only the ones that contain av tec. that is marked out via my own database with a popup that says: "---" or "yes".

 

12 hours ago, Pat Stanford said:

have no idea what you mean by "the sheet format, the database and the entry of the criterion should be disbursable in a dialog.

what i wanted to say is: it would be nice to have a dialog windows where these parameters could be entered before the command is executed.

 

 

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...