standard set of layer useable in any opened drawing
Comments
-
test0
-
You could try using layer states but it would not be completely automatic.
- Open a drawing with the correct layers.
- Start the LAYERSTATE command, create a new layer state and export this layer state to a .las file.
- Open a different drawing and using the LAYERSTATE command import the layer state from the .las file.
... But this will only create or modify layers.
It will not handle wrong/missing text and dimension styles, or handle wrong linetype definitions, and it will not set the (many) drawing related variables etc...
My advice for importing a 3rd party drawing:
- Start a new drawing using your default template (with the correct layers, layouts, etc.).
- Insert the 3rd party drawing and explode the block.
- Purge.0 -
This gives me an idea, I'm going to try and write a lisp for you that will create layers based on those defined in a text file. Similar to what Roy is suggesting, I frequently have to do the same, and I usually open the Solidworks .dwg file, WBLOCK out what I need, create a new drawing using the company standard drawing template (this has all dim styles, text styles, layers, etc. defined) and into that insert my block.0
-
Scott,The least I can say is that that would be a nice gesture!I Appreciate whatever LISP you write but, at least for my purpose, it should be with as minimum effort neccesary to insert the layers in to the SW drived DWG.This because sometimes I should do this in dozens of files. So the MO should be low on click's ;-)Not that I am difficult... *lol*Nico0
-
Hi Nico,
In Sofoco Tools, there is a tool 'Impose Template' which drags in layers from your template drawing.
http://www.sofoco.com.au/sofocotools.html0 -
Thanks Damian,I tried sofoco and it works fine.Just a remark:When doing the impose, the colour of the layer isn't copied. All the layers appear black coloured.My bad or a glitch in the software?I'll do some more testing later on.nico0
-
Hi Nico,
Try this one:
http://www.sofoco.com.au/downloads/Sofoco Tools/SofocoToolsV13.zip
1. I had commented out the color copying and I don't remember why. Maybe now you will find a glitch!
2. Maybe you are the first person that uses this tool! Congratulations!
Damian0 -
@Nico,
Note starting with V12 you can also drag and drop table data from one drawing to another.
http://blog.bricsys.com/2012/03/tip-bricscad-drawing-explorer.html
I would concur with Roy's approach of starting a new drawing with your own template, then inserting the SW data into it. In this template you could already have the layers set up to the right colour and linetype. When you insert the SW data it will take on these properties. Using your own template, will also avoid dealing with other more cryptic drawing format issues.
Depending on the form of the data you could _XREF the SW file in, use _BOUNDARY to trace around, then remove the xref from your drawing.
You could also create a script to set up standard layers
[code]_EXPERT 5
_LINETYPE _L hidden
iso
_L center
iso
_L dashed
iso
_L phantom
iso
._LAYER _M TITLE
_C 7 TITLE
_M VPORTS
_C 6 VPORTS
_M TEXT
_C 140 TEXT
_M HIDDEN
_C 5 HIDDEN
_L hidden HIDDEN
_M CENTER
_C 1 CENTER
_L center CENTER
_EXPERT 0
_CLAYER 0
[/code]Regards,
Jason Bourhill
0 -
Thanks Damian,I'll have a go with the adapted version of sofoco.Thanks Jason,That is also a solution, although I'm am not familiar with scripting.I ain't working a lot in Bricscad, more in Solidworks. But I am starting to see that for certain projects Bricscad would be more efficient to use.(Ideal would be to be able to exchange more files between the two, not only in the acis format but for example in a parasolid format)Is there a way to do for example this:- Write a script that adds layers X,Y and Z to an opened drawing. (or even do this in bulk? For a number of selected files)- Add a button to the taskbar or menu witch activates this script. Not doing every time run script, .....Is this possible?0
-
I set up several layers automatically using the file on_doc_load.lsp. Sample for entries for use in on_doc_load:
[code]
(if (null (tblsearch "layer" "power"))
(command "-layer" "make" "power" "color" "cyan" "power" "")
)
(if (null (tblsearch "layer" "revisions"))
(command "-layer" "make" "revisions" "color" "yellow" "revisions" "")
)
(if (null (tblsearch "layer" "lighting"))
(command "-layer" "make" "lighting" "color" "magenta" "lighting" "")
)
(if (null (tblsearch "layer" "paper"))
(command "-layer" "make" "paper" "color" "white" "paper" "")
)
[/code]
You could also put functions like these is a separate lisp file that you could call from a toolbar button or from the command line. Sample stand-alone lisp file:
[code]
(defun c:addl ()
(if (null (tblsearch "layer" "power"))
(command "-layer" "make" "power" "color" "cyan" "power" "")
)
(princ)
)
[/code]0 -
I use a script file for that, it can also recreate layers which have been purged etc. Also use them basically in place of layer states.
You can create a script with Bcad's script creator function then edit it using the format it follows.
They are pretty much keyboard macros, often a good alternative for lisps when you don't need to insert variables.
[code]LAYER N DEFPOINTS,ABO,AGR,ACL,ALI,APL,AST,D-AGR,D-ABO,D-AST,DW2,DW3,DW5,DW7,DWF,DWH,DWI,DFX,PW2,PW3,PW5,PW7,PWH,PWI,TY2,TY3,TY5,TY7,BW2,BW3,BW5,BW7,CON
C 1 *I,AGR,D-AGR
C 2 *3,APL,DWH
C 3 ACL,ALI
C 4 AST,DWF,D-AST
C 5 *7,DFX
C 6 *5
C 7 *2
C 8 CON
C 9 ABO,D-ABO
L CENTER2 AGR,DWF,D-AGR
L DASHDOT APL
L PHANTOM2 AST,DFX,D-AST
L HIDDEN *H
[/code]0