Jump to content
  • 0
Sign in to follow this  
Christiaan

Ability to map multiple classes to sub-class

Question

At the moment when mapping classes you have to do them one by one. What would be quite useful is the ability to select a bunch of classes and essentially move them all into a sub-class with one command.

This would allow us to import Autocad drawings and quickly tidy up the classes, moving everything out of the top level, without destroying them.

Share this post


Link to post

13 answers to this question

Recommended Posts

  • 0

Just to add to this, even if you are organised enough to create Class Mapping files for all the different consultants you work, even then some of them don't use consistent classes (AutoCAD layers) and templates, so you still end up with errant classes making there way into your workflow.

Being able to select a number of classes and shift them on the fly to a new sub-group (similar to the way you can reassign one class to another when you delete a class) is very close to the top of wishlist. It would certainly be one of those improvements that lowers office stress levels. smile.gif

Also, to be clear what I want is to be able to move:

class name 1

class name 2

class name 3

to:

new class 1-class name 1

new class 1-class name 2

new class 1-class name 3

Share this post


Link to post
  • 0

This would improve things for everyone who works with consultants that contribute to background information on the drawings - i.e., every architect who uses a surveyor's or civil engineer's information.

Share this post


Link to post
  • 0

I'm not quite sure about "on the fly". The files I get often require intense inspection. (Or should I say that they provide hours of entertainment for absolutely free?)

Nevertheless, better tools would be most welcome!

Share this post


Link to post
  • 0

There are two existing solutions to this that I know of.

1. There is a utility that operates under VW which will set a prefix for classes. I do not know the name of it. With it you can change the classes Alpha and Bravo to prefix-Alpha and prefix-Bravo. Therefore when importing a survey you can use the prefix of survey and all of those classes now reside under the class of survey.

Sorry I don't know the name of this plug-in. Do a web search and perhaps you can find it, or perhaps on VectorDepot.

2. VW12 will allow you to delete classes and automatically reasign them to a class of your choosing. I know this is not the same. But for some it might be all they need to tidy up their classes.

Of course you can really do the same by importing into a new blank file, select all and change them to a new single class.

Having said all that, it would be wonderful to have the ability to add a prefix right in the OEM version of VW.

Share this post


Link to post
  • 0

This will works other way round.

procedure DeleteGroupClasses;

var

allclass, n : integer;

dbox, ccn, ncn : string;

begin

dbox := StrDialog('Remove Group Name','Import');

allclass := ClassNum;

for n := 1 to allclass do

begin

ccn := ClassList(n);

if (Pos(Concat(dbox,'-'), ccn) = 1) then

begin

ncn := ccn;

Delete(ncn, 1, Len(dbox) + 1);

RenameClass( ccn, ncn);

end;

end;

end;

run(DeleteGroupClasses);

G-Pang

Share this post


Link to post
  • 0
1. There is a utility that operates under VW which will set a prefix for classes.

This is excellent, thanks Kevin. It prefixes *all* classes rather than a select few but it's still very useful for bringing data in via a quarantine file.

2. VW12 will allow you to delete classes and automatically reasign them to a class of your choosing ... Of course you can really do the same by importing into a new blank file, select all and change them to a new single class.

The problem with this method is that you either need to do them one by one (and the new classes need to already exist) or you have to flatten them all into one class.

Share this post


Link to post
  • 0

What type of error?

There were 2 type of scripts.

One for Prefix and the other for Deprefix.

G-Pang

Share this post


Link to post
  • 0

For the prefix one G:

Line #1: var

|

{ Error: Variable declarations must be at the beginning. }

Line #2: allclass, i : integer;

|

{ Error: Identifier not declared. }

|

{ Error: Identifier not declared. }

Line #3: className1, currentClassName : string;

|

{ Error: Identifier not declared. }

|

{ Error: Did not expect this after end of statement - missing ;? }

|

{ Error: Identifier not declared. }

Line #6: className1 := StrDialog('Enter Group Name to all classes:','Import');

|

{ Error: Identifier not declared. }

Line #7: allclass := ClassNum;

|

{ Error: Expected END }

|

{ Error: Identifier not declared. }

Line #8: for i := 1 to allclass do

|

{ Error: Identifier not declared. }

|

{ Error: Expected a variable. }

|

{ Error: Identifier not declared. }

Line #10: currentClassName := ClassList(i);

|

{ Error: Identifier not declared. }

|

{ Error: Identifier not declared. }

Line #11: RenameClass(currentClassName, Concat(className1,'-',currentClassName));

|

{ Error: Expected END }

|

{ Error: Identifier not declared. }

|

{ Error: Expected a string. }

|

{ Error: Expected a string. }

|

{ Error: Expected , }

|

{ Error: Expected a string. }

|

{ Error: Expected a string. }

|

{ Error: Expected ) }

|

{ Error: Did not expect this after end of statement - missing ;? }

|

{ Error: Identifier not declared. }

|

{ Error: Identifier not declared. }

Share this post


Link to post
  • 0

Christiaan,

Those error cause by incomplete script. ( missing procedure command )

You should copy whole of the script and don't miss any scripting line.

The script should start from...

procedure RenameClasses;

and end up with...

run(RenameClasses);

Don't miss the procedure first line.

With those 2 scripts..it will complete the your classes prefix / deprefix issue.

G-Pang

Share this post


Link to post
  • 0

Dunno how I did that, sorry G. Your script does the same as the downloadabel plugin mentioned above. i.e. it prefixes *all* classes rather than a select few, but it's still very useful for bringing data in via a quarantine file, as is the mentioned plugin. Thanks.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
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.

×