Author Topic: Wire / Cable Label  (Read 31442 times)

0 Members and 1 Guest are viewing this topic.

M-dub

  • Guest
Wire / Cable Label
« on: March 12, 2009, 10:03:42 AM »
Before I attempt to create this myself, I just thought I'd check to see if anyone has something similar already and would be willing to share.

I've been meaning to do something like this for a VERY long time.  I guess you could call it a leader with a dynamic 'arrowhead'.

This is what I'm after.  A wire / cable label that allows me to stretch the components depending on how many wires are being labelled.  I would also like to be able to stretch the leader component.

Would I need to have two separate blocks to deal with the justification of the text?  (MR vs ML).

Any ideas?

Thanks a lot

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Wire / Cable Label
« Reply #1 on: March 12, 2009, 11:16:42 AM »
Here you go.  It'll get you started.
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

M-dub

  • Guest
Re: Wire / Cable Label
« Reply #2 on: March 12, 2009, 11:25:08 AM »
Thanks Matt...
I'm working on it right now.

Still haven't exactly figured everything out about dynamic blocks yet...

M-dub

  • Guest
Re: Wire / Cable Label
« Reply #3 on: March 12, 2009, 11:43:31 AM »
I take it Text Justification is not a Dynamic Parameter that can be set.

For what it's worth, I'm pretty sure it will be MUCH easier to creat two separate blocks; one for right justified text and one for left.

James Cannon

  • Guest
Re: Wire / Cable Label
« Reply #4 on: March 12, 2009, 12:05:32 PM »
I take it Text Justification is not a Dynamic Parameter that can be set.

For what it's worth, I'm pretty sure it will be MUCH easier to creat two separate blocks; one for right justified text and one for left.

Haven't fudged with it for text yet, but there is a "mirror" action for dyn blocks.

Otherwise, worst case, create a "visibility set" for left versus right, and have the label show up in both (so you don't have to re-stretch it if you switch sides, later) and then you can toggle left or right.

Atook

  • Swamp Rat
  • Posts: 1029
  • AKA Tim
Re: Wire / Cable Label
« Reply #5 on: March 12, 2009, 12:21:43 PM »
This could be useful for pipe sizes too, can you post what you come with for a solution?

ronjonp

  • Needs a day job
  • Posts: 7527
Re: Wire / Cable Label
« Reply #6 on: March 12, 2009, 12:35:50 PM »
This could be useful for pipe sizes too, can you post what you come with for a solution?

Don't do it!! You know the dynamic block will break  :-P

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

M-dub

  • Guest
Re: Wire / Cable Label
« Reply #7 on: March 12, 2009, 12:58:08 PM »
Otherwise, worst case, create a "visibility set" for left versus right, and have the label show up in both (so you don't have to re-stretch it if you switch sides, later) and then you can toggle left or right.

That's what I was thinking about, but ... Well, once I get this one done (just got back from lunch), that might go into version 2.

This could be useful for pipe sizes too, can you post what you come with for a solution?

I was planning on it.  :)

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Wire / Cable Label
« Reply #8 on: March 12, 2009, 01:02:14 PM »
I take it Text Justification is not a Dynamic Parameter that can be set.

For what it's worth, I'm pretty sure it will be MUCH easier to creat two separate blocks; one for right justified text and one for left.

I am curious too about the justification.  I am trying to get it to work in another block.
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

M-dub

  • Guest
Re: Wire / Cable Label
« Reply #9 on: March 12, 2009, 01:08:23 PM »
I was thinking the justification would have to be based on some reactor or something, but "Good luck with that, self!"  :P

Kate M

  • Guest
Re: Wire / Cable Label
« Reply #10 on: March 12, 2009, 01:38:43 PM »
I take it Text Justification is not a Dynamic Parameter that can be set.

For what it's worth, I'm pretty sure it will be MUCH easier to creat two separate blocks; one for right justified text and one for left.

I am curious too about the justification.  I am trying to get it to work in another block.
Unfortunately justification doesn't change with the flip action. (At least for single-line attributes -- I haven't tested multiline.) What you can do is have an invisible attribute that you fill in, then two pieces of text that reference the attribute with the appropriate justification. You still have to control it with a visibility state, though.

M-dub

  • Guest
Re: Wire / Cable Label
« Reply #11 on: March 12, 2009, 01:51:52 PM »
That sounds like it might work too, Kate.

Working on this thing again... Sheesh!  Everyone here seems to have saved their drawing requests for today, when I'm the only CAD guy in the office!

M-dub

  • Guest
Re: Wire / Cable Label
« Reply #12 on: March 12, 2009, 02:07:06 PM »
Ok, this is going to make me sound really novice, but I have never really used the Block Editor.

EDIT:  I figured it out... BSAVEAS, then Check the 'Save block definition to drawing file' box.  (Uploaded file updated)

Here's the newbie question:  (For what I anticipate is going to be a very simple answer, the problem is hard to explain, but I'll try)
How do I get the block I created in the block editor ... to ... work right?

I'm in a dwg file, which I THOUGHT was going to be the block.  Well, it IS, but when I go to insert it into another drawing, the DYNAMIC block is nested inside the dwg file I've saved.

In my whole CAD career, I've only ever used WBLOCK to create my blocks... or create them from scratch in a new dwg.
Here... have a look.  Then, we'll talk about why I can't get the attribute to stretch with the line work.
« Last Edit: March 12, 2009, 02:35:10 PM by M-dub »

M-dub

  • Guest
Re: Wire / Cable Label
« Reply #13 on: March 12, 2009, 02:34:29 PM »
Now, that the above problem is fixed, does anyone know why the attribute in the block won't move / stretch with the dynamic grips?

Kate M

  • Guest
Re: Wire / Cable Label
« Reply #14 on: March 12, 2009, 02:53:26 PM »
Since the block editor was introduced, many people prefer to their blocks in a "container" drawing, which makes it easy to pull blocks in from DesignCenter or a tool palette, but difficult to use the "insert" command. (Personally, I don't miss insert.) To see what I mean, I'm sending your block back in a container drawing. This also gets rid of the "M-ELECT-CableLabel.dwg contains authoring elements. Open in Block Editor?" message, and makes "Save block definition to drawing file" unnecessary.

The reason your text isn't moving with the line is that it's not included in your stretch action's selection set. It's a quirk of dynamic block stretches that defining the window and selecting the objects are two separate events. I added the text to Distance2's stretch, and the text and Distance2 to Distance1's stretch. (It's okay -- and often good -- to include parameters in an action's selection set. Much less often is it good to include an action in a selection set.)

I'll let you keep playing with the attributes/fields/visibility states... :wink: