Jump to content
  • 0

Ability to map multiple classes to sub-class


Christiaan

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.

Link to comment

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

Link to comment
  • 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.

Link to comment
  • 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

Link to comment
  • 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.

Link to comment
  • 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. }

Link to comment
  • 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

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
Answer this question...

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