Creating attributed polyline for wire and wire labels?
Hello,
I am wondering if there is functionality in BricsCAD to create a polyline with attributed text similar to that in the image attached below. As you can see I would like to create a wire with configurable wire labels at each end. I would like the text to be attributed so that it can be extracted from the drawings to ensure wire tags are not duplicated throughout the drawing. I would also like to mask underneath the attributes but that is a separate issue.
Could dynamic blocks accomplish this? Is a LISP routine required?
I have found a way of doing this by using a multileader with a block attached at the end, however I'm only able to attach the block to a single end of the MLeader and this doesn't seem to be a very sleek solution.
I am on BricsCAD Classic Version 15.3.09
Thanks,
I am wondering if there is functionality in BricsCAD to create a polyline with attributed text similar to that in the image attached below. As you can see I would like to create a wire with configurable wire labels at each end. I would like the text to be attributed so that it can be extracted from the drawings to ensure wire tags are not duplicated throughout the drawing. I would also like to mask underneath the attributes but that is a separate issue.
Could dynamic blocks accomplish this? Is a LISP routine required?
I have found a way of doing this by using a multileader with a block attached at the end, however I'm only able to attach the block to a single end of the MLeader and this doesn't seem to be a very sleek solution.
I am on BricsCAD Classic Version 15.3.09
Thanks,
0
Comments
-
Hi Kieran,
If you are willing to consider using a third-party tool, our CADPower may have a solution for your requirements.
First, to attach attributes to any CAD entity, you can use XDATA, which is a standard CAD features. This is easily done using the CP_DATAMAN command in CADPower using user-created INI files for defining the structure.
Next, you can create the CP_OD_XD_LABEL tool to create labels from your attributes and place them along-side your entities.
This tool may or may not be exactly what you want to see but I am keen to hear from you and fine-tune the tool to do something that is closer to what you need.
CADPower users use this tool a lot to create more meaningful and intelligent data driven entities in their .dwg platform.
Best Regards
Rakesh Rao
Smarter .dwg CAD0 -
Hi
its not quiet your complete whish, but i have an Tool, whitch writes into the linetype the Layername where it's put on.
You can use this Tool. With some changes you can do your suggestion.
[code](defun C:LTYPES->Layer (/ DNAME DATEI LAYER LAYERNAME LT LTPS OLDCMD Block ITEM LAYOUT)
(vl-load-com)
(setq DNAME (strcat (getvar "SAVEFILEPATH") "Temp.lin"))
(if (setq DATEI (open DNAME "w"))
(progn
(While (setq LAYER (tblnext "LAYER" (null LAYER)))
(setq LAYERNAME (cdr (assoc 2 LAYER)))
(setq LTPS (cons LAYERNAME LTPS))
(princ (strcat "*" LAYERNAME ",-" LAYERNAME "-\n") DATEI)
(princ (strcat "A,3,-1,[\""
LAYERNAME
"\","
(getvar "TEXTSTYLE")
",S="
(rtos (getvar "TEXTSIZE"))
",R=0.0,X=-";0.1,"
(rtos (/(getvar "TEXTSIZE")2))
",Y=-"
(rtos (/(getvar "TEXTSIZE")2))
"],-"
(if (> (strlen LAYERNAME) 1)
(itoa (fix(*(strlen LAYERNAME)(getvar "TEXTSIZE"))))
"2"
) ;_ end of if
"\n"
) ;_ end of strcat
DATEI
) ;_ end of princ
) ;_ end of While
(close DATEI)
(setq OLDCMD (getvar "CMDECHO"))
(setvar "CMDECHO" 0)
(foreach LT LTPS
(if (tblsearch "LTYPE" LT)
(progn
(command "_-linetype"
"_l"
LT
(findfile DNAME)
"_y"
""
) ;_ end of command
) ;_ end of progn
(progn
(command "_-linetype"
"_l"
LT
(findfile DNAME)
""
) ;_ end of command
) ;_ end of progn
) ;_ end of if
) ;_ end of foreach
(vl-file-delete (findfile DNAME))
(setvar "CMDECHO" OLDCMD)
) ;_ end of progn
) ;_ end of if
(vlax-for LAYOUT (vla-get-layouts
(vla-get-activedocument (vlax-get-acad-object))
) ;_ end of vla-get-layouts
(vlax-for ITEM (setq BLOCK (vla-get-Block LAYOUT))
(vl-catch-all-error-p
(vl-catch-all-apply
'vla-put-Linetype
(list ITEM
(vla-get-layer ITEM)
) ;_ end of list
) ;_ end of vl-catch-all-apply
) ;_ end of vl-catch-all-error-p
) ;_ end of vlax-for
(vlax-for BLOCK (vla-get-blocks
(vla-get-activedocument (vlax-get-acad-object))
) ;_ end of vla-get-blocks
(vlax-for ITEM BLOCK
(vl-catch-all-error-p
(vl-catch-all-apply
'vla-put-Linetype
(list ITEM
(vla-get-layer ITEM)
) ;_ end of list
) ;_ end of vl-catch-all-apply
) ;_ end of vl-catch-all-error-p
) ;_ end of vlax-for
) ;_ end of vlax-for
) ;_ end of vlax-for
)[/code]0 -
@ Martin:
In BricsCAD there is no need to create a temporary .lin file. You can either entmake a linetype or use the appropriate vl* functions.0
This discussion has been closed.