Jump to content
  • 1

DWG Import - Option to remove xref prefix from imported class and resource names


shorter

Question

One of the many issues we face when dealing with importing DWG data from third parties (other than the sheer mess we are asked to work with) is the endless number of duplicate classes caused by autocad prefixing the layer (i.e. class) name with the xref name, separated by the $ character.

 

There may be multiple files, but the underlying classes are the same, e.g.

 

ABC4L4$0$PL-SANW-AR

 

ABC4L5$0$PL-SANW-AR

 

ABC4L6$0$PL-SANW-AR

 

etc

 

Of course, none of the above classes are compliant as a result, but that does not seem to matter if you use Autodesk products...

 

It would be very useful if we had an option to remove the file name prefix on import of a DWG.

 

 

 

Edited by shorter
  • Like 1
Link to comment

12 answers to this question

Recommended Posts

  • 0
8 hours ago, shorter said:

One of the many issues we face when dealing with importing DWG data from third parties (other than the sheer mess we are asked to work with) is the endless number of duplicate classes caused by autocad prefixing the layer (i.e. class) name with the xref name, separated by the $ character.

 

There may be multiple files, but the underlying classes are the same, e.g.

 

ABC4L4$0$PL-SANW-AR

 

ABC4L5$0$PL-SANW-AR

 

ABC4L6$0$PL-SANW-AR

 

etc

 

Of course, none of the above classes are compliant as a result, but that does not seem to matter if you use Autodesk products...

 

It would be very useful if we had an option to remove the file name prefix on import of a DWG.

 

 

 


Ask the third party to use “insert” instead of “bind” when using the ref bind command.  This will eliminate adding the undesired prefixes.  Alternatively, you could ask them to send all the files unbound, place them in a single directory, and open them in vectorworks.   The latter option being much easier to manage changes over time.

Link to comment
  • 0

If a class name 

 

=a$0$b

 

where a is the xref file name and varies and b is the class name I want to keep but also merge with other classes where b is the same, I want to be able to rename all classes on import of 800 DWGs or apply afterwards to 800 vw files. 
 

Edited by shorter
Link to comment
  • 0

Is there any way in Autocad (or Bricscad) to prevent that behavior

of adding Prefixes to Layers of (external) References ?

 

Because that is even annoying in Autocad World in Layer Palette.

I don't get the idea behind.

Can you elaborate a bit about how it is meant and to be used ?

And I am not sure if ACAD treats them as separate Classes or not.

If I can edit one of them to change all, or are they even meant to

be editable ?

 

 

In your case - already existing DWGs - you may need to repair it

after VW import though.

 

I think that should be an Option in the DWG Import Dialog,

to collapse all $ Layer Duplicates or not.

Link to comment
  • 0
11 hours ago, zoomer said:

Because that is even annoying in Autocad World in Layer Palette.

I don't get the idea behind.

The reason for this is that AutoCAD cannot tell if layer A in drawing 1 is about the same thing as layer A in drawing 2, not to mention that layer colour could be different etc. for the same layer name. By default the existing layer overrules the imported layer, so in order to avoid things going hayware AutoCAD identifies the layers of xrefs with prefixes of the filename. This would also allow to turn a specific layer off in a single xref instead of all xrefs.

 

However... when the layers are about the same thing then it is less desired to have this behaviour.

 

This is why I suggested in the past to have VW's filenaming to be editable at the various levels where the hierarchical sublevels could all be renamed by just renaming the higher-up level.

e.g. when I have class names ABC-1, ABC-2-2, ABC-2-3 then renaming ABC to XYZ would then rename the whole sequence for all the  subclasses of ABC.

Renaming the first occurence of 2 in ABC-2-... to 5 would then rename ABC-2-.... to ABC-5-...... without affecting ABC-1.

 

If that would be implemented then it would be very easy to get rid of the AutoCAD xref naming prefixes of imported dwg xrefs by just removing/renaming the topmost prefix in hierarchical view.

 

 

  • Like 2
Link to comment
  • 0
3 minutes ago, Art V said:

The reason for this is that AutoCAD cannot tell if layer A in drawing 1 is about the same thing as layer A in drawing 2, not to mention that layer colour could be different etc. for the same layer name. By default the existing layer overrules the imported layer, so in order to avoid things going hayware AutoCAD identifies the layers of xrefs with prefixes of the filename. This would also allow to turn a specific layer off in a single xref instead of all xrefs.

 

However... when the layers are about the same thing then it is less desired to have this behaviour.

 

This is why I suggested in the past to have VW's filenaming to be editable at the various levels where the hierarchical sublevels could all be renamed by just renaming the higher-up level.

e.g. when I have class names ABC-1, ABC-2-2, ABC-2-3 then renaming ABC to XYZ would then rename the whole sequence for all the  subclasses of ABC.

Renaming the first occurence of 2 in ABC-2-... to 5 would then rename ABC-2-.... to ABC-5-...... without affecting ABC-1.

 

If that would be implemented then it would be very easy to get rid of the AutoCAD xref naming prefixes of imported dwg xrefs by just removing/renaming the topmost prefix in hierarchical view.

 

 

like the sound of that!

Link to comment
  • 0
10 minutes ago, Art V said:

The reason for this is that AutoCAD cannot tell if layer A in drawing 1 is about the same thing as layer A in drawing 2, not to mention that layer colour could be different etc. for the same layer name. By default the existing layer overrules the imported layer, so in order to avoid things going hayware AutoCAD identifies the layers of xrefs with prefixes of the filename. This would also allow to turn a specific layer off in a single xref instead of all xrefs.

 

 

Yes, usually I was asked about if I want to import a new Class or Symbol

that is already existing, or use the existing in the File instead.

 

Usually in ACA ... ahm ... Bricscad I merged the Layers manually.

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