Jump to content
Sign in to follow this  
ionw

Finding Viewport Scale

Recommended Posts

I am making a tool that I have need to show certain objects at certain scales. It is a redone Toilet and grab bars tool, and I want to at 1/8" scale to hide details such as toilet paper dispensers, and show them in enlarged plans say at 1/4."

On design layers this is a trivial exercise, the issue I have is when something is displayed in a viewport. Any scale calls I know of return the 1:1 scale of the sheet layer. I found how to find handles to my pios if they are in the annotations area of viewports.

So the issue is defined thusly:

draw on an 1/8" design layer, use the pio that can display fine detail, but doesn't because the plan is drawn at 1/8".

Make a viewport to make an enlargement at 1/4", the displayed pio now shows the extra detail because of the larger scale.

thanks in advance,

ion

Share this post


Link to post

Ion, if I were presented with this issue, I think I would look at classing to handle the different detail levels. We are interested in hearing from you about improvements we could add to our Toilet Stall object..

Share this post


Link to post

Hi Robert,

I am slowly converting an office with many years of working actively disdaining classes. Regardless of the validity of working via classes there is a huge resistance to seeing a large list of classes, so I am loathe to add even one additional one, if there was another way about it.

Regarding the Toilet/Grab bars 'improvements' is actually a regression of sorts for the Toilet stall tool. The issue we have with it is that it has too many options. Ours are predefined with only two length options for the side and rear bars, one fixture symbol, no partitions. You can see from the pref window how much it is reduced. The finish_offset allows us to draw our walls using the framing, and be able to represent the finish thickness where clearances are tight.

In the it is the same problem that we have with the overly complicated Doors and Windows. Please do not get me wrong, for my schematic and 3d Modeling I am very happy to use these very modifiable doors and windows. But for 80-90% of our CDs are better off with a 2d representation that merely have a width, configuration, jamb thickness. I understand that there is an issue with staying current as a CAD platform and keep offices like ours happy who are wanting a tool that was old ten years ago.

In the end, almost all of the tools I have made for the office are simplified versions of current tools, to speed production up.

HTH,

ion

Share this post


Link to post

Ionw, your view is totally the opposite of mine - I would like to see more Classes in most of the PIOs so that the appearance can be correct in both 2D and 3D.

I must admit though that I don't have your problem of trying to manage multiple users and get them all doing the correct thing (I have done this in the past and I do know how difficult it is to get everyone rowing in the same direction). Hence I assume your desire for simplicity and fewer options.

What is needed is a solution that satisfies both needs. ie. a minimal class solution and a more comprehensive class solution. Perhaps a structure where a generic overall class can be used, with an option for sub-classes for those requiring it - similar to the way wall components can now be classed or not classed.

Share this post


Link to post

Classes are the way to go with pio's.

All my pio's have classes for each part. That way the user can define the pio how he wants, and get the visibility he/she wants.

When not defining any classes, they will be the none class.

This way you can alter the object with the attributes pallete.

So you can choose to either go with classes or just choose the attributes.

If every part of a pio has a class, the pio itself is much more flexible and editeble for presentation.

Share this post


Link to post

I never really count them, but I always got many.

If I count rough, I think there are always +/- 200 classes in a project to begin with. Plus I make extra classes per project for special things. Every symbol is based on classes. I rarely use the none class.

This seems much, but it really easy to use them, and a real time saver!

Edited by DWorks

Share this post


Link to post

Ion -

Though I'm in agreement w. others about the value of adding more Classes, I can also understand having drawing conventions that you may not necessarily want to change. To answer the question I think you were initially asking, the call you want to use is:

PortScale := GetObjectVariableReal (h,1003);

"PortScale" is the returned scale of the selected ViewPort.

"h" is the handle of the selected ViewPort.

I hope this helps.

Share this post


Link to post

I can tell you it is not my view. I am a huge proponent of utilizing classes in an office that sees them as an unnecessary complication to the drawing. I am slowly bringing them around, but at this point even one more class is a large percentage increase in the class list. If it is possible to avoid adding it I would prefer to do that.

The other advantage is that there is never the excuse of not knowing the information existed so that class was not turned on or off. In addition to classes I am a proponent of making tools that simply act as they should based on their view. Exactly like Wall components now. You can hide wall components based on scale regardless of classing, I want to include the same ability in our tools.

All of that said, using a class that is named something like enlarged detail and is used in all PIOs that have multiple view options may be a solution.

Share this post


Link to post

Thanks Andrew,

if I could be a little more trouble, I know how to get the layer handle an object resides on, but how do you get the handle to the viewport an object is going to be displayed in?

Thanks for your help!

ion

Share this post


Link to post
I never really count them, but I always got many.

If I count rough, I think there are always +/- 200 classes in a project to begin with. Plus I make extra classes per project for special things. Every symbol is based on classes. I rarely use the none class.

This seems much, but it really easy to use them, and a real time saver!

Dworks,

Thanks.

I wonder if you would be willing to post a new topic explaining how you keep them all straight? How do you have your classes organized? What sort of naming convention do you use? How do you remember to use a specific class instead of another with a similar name?

I struggle with this sort of thing and would be happy to see some tips from someone who has clearly developed a workable system.

Thanks for any help you can offer.

Share this post


Link to post

Ion -

I've named most of my VPs. To get a given VP's handle I use GetObject (which looks for the name).

As to knowing what VP will display a given object, I don't know a way to do that - if that's even possible, aside from polling for Class visibilities.

Share this post


Link to post
I wonder if you would be willing to post a new topic explaining how you keep them all straight? How do you have your classes organized? What sort of naming convention do you use?quote]

I've taken advantage of 2 things in VW's handling of Class order:

1) I use numbers to group Classes of similar general function.

2) I use VW's Class name tree system to subdivide those functions.

That way, my Classes always show up in a specific order, regardless of what alphabet letter starts a given Class' name.

For example, "5" is a general division for stage lighting elements. ""Flown" and "Ground" are where those elements are placed.

A snippet from my Class list:

5 Flown-Conventional

5 Flown-Intelligent

5 Flown-Truss-Main

5 Ground-Intellig.

5 Ground-Convent.

5 Ground-Truss

Make sense?

Share this post


Link to post

C.Andrew,

Thanks.

Numbering is clearly a good idea as is using a hierarchical system. That certainly suggests re-wishlisting the ability to show hierarchical lists in the Navigation palette.

I'd like to see it as an option that can be turned on or off at will without affecting the actual structure of the list.

I wonder how many people use a numbering system and do they create their own system from scratch or do they start with a standard format for their numbering (such as the MasterFormat system for architecture here in the U.S.) ?

Share this post


Link to post

Like C.Andrew, I use the sub-classes a lot. I have always a main class and lots of sub-classes.

One thing you need to know is that I rarely have to change a class, and that I rarely need to know which class I need to use to draw something. I also always have the none class as active class.

The thing is that I use symbols a lot and set them to be automaticly set in a class. that way you don't need to remember which class they need to be on.

Also: you can save groups and pio's as symbols and also give them a class to be on when imported.

I will try to specify a short list of how I use my classes, I will try in english, because I speak dutch.

Another thing needed to know is that I have many classes so that I can work with my colors, and that I can then overwrite the colors in VP to suit the plan needed, may it be for presentation to the client or for the engineer that calculates the building.

*the standard classes:

None

Dimensions

*I use classes for general things that needs to be the same and used in many occasions

attributes - border

attributes - seeable

attributes - non seeable

attributes - readsigns

attributes - ...

...

*I use classes for ground planes and floors

this way I can change the hatch in the viewport when the costumers ask me to. they can see the result directly.

floor - interior - kitchen

floor - interior - bathroom

floor - interior - living room

floor - interior - ...

floor - exterior - terrain

floor - exterior - street

floor - exterior - ...

floor - construction - flat roof

floor - construction - floor slab

floor - construction - ...

floor - building

floor - ...

*I use classes for stairs

the first two are for grouping the symbols, and the attributes are for giving the attributes to the parts.

stair - interior

stair - exterior

stair - attribute - thread

stair - attribute - handrail

stair - attribute - ....

*I use classes for the pios like windows, doors,...

note that i use my own or i use symbols

'schrijnwerk' - exterior

'schrijnwerk' - interior

'schrijnwerk' - attribute - glass

'schrijnwerk' - attribute - section

'schrijnwerk' - attribute - ....

*I use classe for when I need to draw my elevations in 2D or when I need to annotate them

elevation - ground

elevation - wall - 1

elevation - wall - ...

elevation - roof - 1

elevation - roof - ...

*The same way as my elevations, I use classes for my sections

section - ground

section - wood

section - floor - floor finish

section - floor - insulation

section - construction - concrete

section - ...

*I have classe for text

text - 'schrijnwerk'

text - stair

text - elevation

text - level

text - section

text - ...

*I have classes for other interior design like furniture and fixtures

interior - furniture - low

interior - furniture - high

interior - furniture - ...

interior - fixtures - low

interior - fixtures - ...

interior - ...

* I have classes for walls

walls - interior

walls - exterior

walls - attributes - insulation

walls - attributes - brick inside

walls - attributes - brick outside

walls - attributes - ...

*I have classes for my ground piping

sewerage - attributes - wc

sewerage - attributes - dirt water

sewerage - attributes - rain water

sewerage - fixtures

sewerage - ...

*I have classes for many other things

....

As you see whan you group your classes, they become very manageble. The only thing that the navigation pallete doesn't have is to open/close groups for better searching classes.

I must say that how you name your classes and how you choose them will depend on how you work, what work you do and what you want to get out of your drawing.

The names between '' are things I can't find the translation.

Also you'll have to add extra classes for some projects because they have special things. Don't be scared to do it. Just give them a meaning name.

All those classe seems a lot of work, but if you update your library to use those classes, you'll never have to think of them again. And in the end you'll be happy you got them when something needs change of attribute.

Also make groups of much used things and store them as a symbol.

You can use classe in two ways:

* for giving attributes

* for grouping objects

Also when you used your classes the wright way, you will get spreadsheets really fast and accurate if needed.

For some projects it will seem stupid and silly to use so many classes, but you will see and discover that it's better in the end.

There is a lot more to tell about classes, and my way is not the only way to do it. It all eventually depends on how you want to draw and what you need to do and how you want your drawings to work.

So maybe there are other that have other uses for classes and work differently, please post it so we can all learn from it. I beleave that all way of working has something good in it and something bad.

All comments are welcome

Share this post


Link to post
Like C.Andrew, I use the sub-classes a lot. I have always a main class and lots of sub-classes.

Thanks DWorks for taking the time to post such a thorough reply.

I see your logic and also see why using symbols will make things easier. I need to put a lot of thought into my class system.

Thanks again.

Share this post


Link to post

boxjoint -

Would you care to explain what you mean by "the ability to show hierarchical lists"? Curious...

As to what DWorks was saying about the ability to adjust graphical attributes based on Class assignment, I love the concept but the vast majority of my work is symbol-based (the symbols need to remain symbols when placed) and, as far as I know, geometry within symbols cannot change attributes on a "per-instance" basis. Perhaps something for the Wish List...

Share this post


Link to post
boxjoint -

Would you care to explain what you mean by "the ability to show hierarchical lists"? Curious...

I'm referring to an outline feature like we have in a word processor where the subclasses would be indented from the parent class. (similar to the way the class dropdown menu functions) See the attached illustration.

In the Navigation palette, I think it would be useful to be able to "expand" or "collapse" the list of subclasses perhaps with those little flippy triangles. When you want to see the subclasses that are in your category #5, you could expand that group.

It should be possible to expand only one group, several groups, or all groups at random.

One should also be able to expand or collapse the entire list with a single button, click, or keystroke.

I think that for folks with many classes, it would reduce scrolling, be easier to scan and be less cluttered visually.

Share this post


Link to post

As to what DWorks was saying about the ability to adjust graphical attributes based on Class assignment, I love the concept but the vast majority of my work is symbol-based (the symbols need to remain symbols when placed) and, as far as I know, geometry within symbols cannot change attributes on a "per-instance" basis. Perhaps something for the Wish List...

I use a lot of symbols with classes for changing their attributes with classes. You just need to assign the components of the symbol to classes. These classes will be for attributes.

Then you can use a different class for 'holding the symbol'. This way you can change the symbol appearence just by changing the class attributes.

Or did you mean something else?

Share this post


Link to post

And more evidence of why I should think before typing...

Most of the elements in my symbols are already created in different classes. I use class visibility to control which of those elements are hidden or shown. There just isn't a way to control the graphical attributes of those things based on which Class in which a given symbol is placed.

I guess this is one of those "can't have my cake and eat it too..." things.

Share this post


Link to post
Most of the elements in my symbols are already created in different classes. I use class visibility to control which of those elements are hidden or shown. There just isn't a way to control the graphical attributes of those things based on which Class in which a given symbol is placed.

I guess this is one of those "can't have my cake and eat it too..." things.

You can control the attributes AND the visibility of objects with classes at the same time.

You can set the class of each individual object/component to a class used for controlling attributes.

You can then group (an) object(s) and set that groups class to a class used for controlling visibility.

This way you can control both attributes and visibility of objects in your viewports.

Share this post


Link to post

DWorks -

Makes sense. I hadn't thought of that (though several of my symbols do contain grouped elements).

The thing I'd tried to do (and gave up) was having certain lines within symbols change color (color only - not fill, pattern, or line style) based on which Class on which the symbols are placed. I have symbols that are used in different ways (in different Classes) and differentiating their purpose/Class at-a-glance using color would be a great thing...

Regards -

Share this post


Link to post

So that's what you want.

I think this could be inplemented and really usefull.

This is certainly a thing for the wishlist.

An option for objects to take over the symbol/group class.

But at the maintime, you could make a pio that use these symbols and let the 'lines' you are referring to be on the class of the pio. I think it is doable. You just have to 'check' the object that need to take over the pio's class. You can do this by giving it a name or something like that, or even adding a record.

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.

Sign in to follow this  

 

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