Author Topic: Curly Bracket  (Read 18516 times)

0 Members and 1 Guest are viewing this topic.

M-dub

  • Guest
Curly Bracket
« on: September 18, 2008, 02:34:17 PM »
Does anyone have a dynamic block of a curly bracket that you can scale or stretch?

Just curious as to what's out there already.  (Just getting into dynamic blocks now)

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Curly Bracket
« Reply #1 on: September 18, 2008, 02:38:53 PM »
Here you go!

LEFT   {

RIGHT  }


What in the hell is a curly bracket?!?   :?
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

deegeecees

  • Guest
Re: Curly Bracket
« Reply #2 on: September 18, 2008, 02:39:48 PM »
I've got a Lisp that'll draw curly brackets if that helps. Should I post it up?

M-dub

  • Guest
Re: Curly Bracket
« Reply #3 on: September 18, 2008, 02:40:56 PM »
Here you go!

LEFT   {

RIGHT  }


What in the hell is a curly bracket?!?   :?

That's it.  I don't know the proper name for them.


Never mind.  I don't think the result I'm after would be easy to accomplish.

M-dub

  • Guest
Re: Curly Bracket
« Reply #4 on: September 18, 2008, 02:41:09 PM »
I've got a Lisp that'll draw curly brackets if that helps. Should I post it up?

I don't see why not.  :)

M-dub

  • Guest
Re: Curly Bracket
« Reply #5 on: September 18, 2008, 02:42:41 PM »
What in the hell is a curly bracket?!?   :?

deegeecees

  • Guest
Re: Curly Bracket
« Reply #6 on: September 18, 2008, 02:53:54 PM »
I removed some functionality with scaling based on a titleblock, and some layer settings. Other than that here ya go.

Code: [Select]
;bracket.lsp
;Created for G.E.I.S. by P.R. Donnelly
;Date: Sept of 2002
;Description: Creates brackets for text and such...
;Edit: 09-17-08 - Removed titleblock scaling for M-dub
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;      ___ ;;;;;;;;;;;;;;;;;;
;     (___)_ ;;;;;;;;;;;;;;;;;;
;     |  "\ ;;;;;;;;;;;;;;;;;;
;    (,   .)   Pat da Rat ;;;;;;;;;;;;;;;;;;
;     |  __| ;;;;;;;;;;;;;;;;;;
;     |\___| ;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defun dtr (A)
   (* pi (/ A 180.0)))

(defun c:bracket2 ()
(setq oldplinew (getvar "plinewid"))
(setvar "plinewid" 0)
(setq oldlay (getvar "clayer"))

(setq wutscale 0.125);<------------------------------------------Change to your liking

(setq pnt1 (getpoint "\nSelect point for bottom of bracket:"))
(setq pnt1x (car pnt1))
(setq pnt1y (cdr pnt1))
(setq pnt1y (car pnt1y))
(setq pnt1x2str (rtos pnt1x))
(setq pnt1y2str (rtos pnt1y))
(setq pnt1xy (strcat pnt1x2str " " pnt1y2str))
;(alert pnt1xy);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;debugger

(setq pnt2 (getpoint pnt1 "\nSelect point for top of bracket:"))
(setq ang1 (angle pnt1 pnt2))
(setq pnt2x (car pnt2))
(setq pnt2y (cdr pnt2))
(setq pnt2y (car pnt2y))
(setq pnt2x2str (rtos pnt2x))
(setq pnt2y2str (rtos pnt2y))
(setq pnt2xy (strcat pnt2x2str " " pnt2y2str))
;(alert pnt2xy);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;debugger

(setq pnt3 (polar pnt1 (angle pnt1 pnt2) (/ (distance pnt1 pnt2) 2)))
(setq pnt4 (polar pnt3 (+ (dtr 180) ang1) wutscale))
(setq pnt5 (polar pnt3 ang1 wutscale))
(setq pnt6 (polar pnt3 (+ (dtr 270) ang1) wutscale))
(setq pnt7 (polar pnt1 (+ (dtr 135) ang1) wutscale))
(setq pnt8 (polar pnt2 (+ (dtr 45) ang1) wutscale))
(command "pline" pnt7 pnt1 pnt4 pnt6 pnt5 pnt2 pnt8 "")
(setvar "clayer" oldlay)
(setvar "plinewid" oldplinew)
(princ)



)

M-dub

  • Guest
Re: Curly Bracket
« Reply #7 on: September 18, 2008, 02:59:58 PM »
Thanks Deeg!

deegeecees

  • Guest
Re: Curly Bracket
« Reply #8 on: September 18, 2008, 03:04:42 PM »
Using it for One-Line's? That's what I created it for.

M-dub

  • Guest
Re: Curly Bracket
« Reply #9 on: September 18, 2008, 03:13:23 PM »
Using it for One-Line's? That's what I created it for.

Not right now, but yes, we use them for that as well.

deegeecees

  • Guest
Re: Curly Bracket
« Reply #10 on: September 18, 2008, 03:19:18 PM »
Cool. Glad to be of service.

jnieman

  • Guest
Re: Curly Bracket
« Reply #11 on: September 18, 2008, 03:27:00 PM »
I never have to scale them much... I use them to call our ANSI/UL 263 FIRE RATED ASSEMBLIES in typical wall sections, building sections and crap.

M-dub

  • Guest
Re: Curly Bracket
« Reply #12 on: September 18, 2008, 03:37:13 PM »
Well, I'm still going to make an attempt at creating a dynamic block for this.  I'll post the restults if there are any.  :)

Spike Wilbury

  • Guest
Re: Curly Bracket
« Reply #13 on: September 18, 2008, 03:49:31 PM »
{ HTH  - A2007 }

M-dub

  • Guest
Re: Curly Bracket
« Reply #14 on: September 18, 2008, 03:54:17 PM »
Let me explain what I'm trying to do.

I want to stretch both 'wings' of the bracket equally.  I think I'm getting close with the block editor, but as I mentioned above, I'm just NOW getting into dynamic blocks and the block editor.  Getting there, I think... er hope.


jnieman

  • Guest
Re: Curly Bracket
« Reply #15 on: September 18, 2008, 03:59:48 PM »
ohhhhhhhhhhh

gimme a sec

jnieman

  • Guest
Re: Curly Bracket
« Reply #16 on: September 18, 2008, 04:05:47 PM »
I did not enter a "minimum" value to the distance of the stretch, so there's a possibility of making the bracket invert a bit.

2 blocks.

1 has a grip at each end so you can stretch them independently

Other has one grip and it stretches both ends equally based on center point.

M-dub

  • Guest
Re: Curly Bracket
« Reply #17 on: September 18, 2008, 04:08:16 PM »
I did not enter a "minimum" value to the distance of the stretch, so there's a possibility of making the bracket invert a bit.

2 blocks.

1 has a grip at each end so you can stretch them independently

Other has one grip and it stretches both ends equally based on center point.

[Peter]Freakin' Sweet![/Peter]

Thanks Josh!  That's pretty well Exactly what I was after!

Now, I'm going to take it apart to see how it was made, to compare it to what I had.

M-dub

  • Guest
Re: Curly Bracket
« Reply #18 on: September 18, 2008, 04:09:48 PM »
Now, I'm going to take it apart to see how it was made, to compare it to what I had.

Ooooooohhhh......

I was putting the parameter on both sides.  That makes sense now.

Thanks again, Josh!

jnieman

  • Guest
Re: Curly Bracket
« Reply #19 on: September 18, 2008, 04:24:45 PM »
use the pre-set parameter sets, dood.  This case was a perfect application of that... there's a "linear stretch pair" that works for the symmetric one.  I set it to "chained" but in hindsight, that isn't necessary, but affects something else that doesn't apply here, so don't get hung up if you notice that difference.

I haven't messed with dynamic blocks in many months, so I was feeling my way around, a bit.

Greg B

  • Seagull
  • Posts: 12417
  • Tell me a Joke!
Re: Curly Bracket
« Reply #20 on: September 18, 2008, 05:37:02 PM »
Let me explain what I'm trying to do.

I want to stretch both 'wings' of the bracket equally.  I think I'm getting close with the block editor, but as I mentioned above, I'm just NOW getting into dynamic blocks and the block editor.  Getting there, I think... er hope.



Why did you draw in all those dots?

M-dub

  • Guest
Re: Curly Bracket
« Reply #21 on: September 18, 2008, 07:26:39 PM »
Let me explain what I'm trying to do.

I want to stretch both 'wings' of the bracket equally.  I think I'm getting close with the block editor, but as I mentioned above, I'm just NOW getting into dynamic blocks and the block editor.  Getting there, I think... er hope.



Why did you draw in all those dots?

Had to spend the rest of the budget.

M-dub

  • Guest
Re: Curly Bracket
« Reply #22 on: September 19, 2008, 09:27:05 AM »
Got it figured out this morning.  Created a new one from scratch and added the minimum stretch distance.

Yes, it IS a very simple block, but I wanted to ease myself into dynamic blocks.  I think I'm going to like them.




*aside*
I wonder what will happen if I save this drawing back to an older version of AutoCAD... will the dynamics of the block come back when I open it in 2009?

jnieman

  • Guest
Re: Curly Bracket
« Reply #23 on: September 19, 2008, 09:58:58 AM »
The mistake I made was over-complicating things or thinking it was harder than it was, when I first started.  That's the only reason I was restating that it was a simple block... K.I.S.S. is a good thing to keep in mind for dyn blocks for me.

I do believe a dynamic block, when saved down, then brought back up, will be dynamic still.  Can't be for certain though.  Been a while since I tried it.

Glad you got it to work out.

I didn't leave you too much guidance or "how I did it" because you seem like pretty motivated person, and I figured you'd know it's ok to ask if you ran into a road block.

Dynamic blocks can be real fun... and can apply to a heap load of situations.  Especially for risers and electrical type stuff... I helped the guys in the other office (elec engineering) learn dynamic blocks and made a few examples for them to go by for their power, grounding, and lighting plans.

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Curly Bracket
« Reply #24 on: September 19, 2008, 10:01:48 AM »
Using it for One-Line's? That's what I created it for.

Not right now, but yes, we use them for that as well.
Not being a one-line kind of guy, how would that be used for one-lines?
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

M-dub

  • Guest
Re: Curly Bracket
« Reply #25 on: September 19, 2008, 10:10:03 AM »
.
I didn't leave you too much guidance or "how I did it" because you seem like pretty motivated person, and I figured you'd know it's ok to ask if you ran into a road block.

Funny you say that because I almost had to ask how to get the blocks out of the block editor and into a dwg of its own, so I could insert it into other drawings.  Never used the block editor before.  I've only ever used wblock or created the blocks from scratch.  Shame on me, I guess.   :)


The one thing I would be concerned with would be ... electrical switches, for example.  A drawings gets created, showing switches, etc. in various states, is approved, then changes are applied in the field as per the drawing.  What are the odds of the dynamic blocks somehow changing states by mistake / bug in the system, etc?  Like, a visibility action dependant an on / off status.
Up until now, we've used one of two separate blocks depending on whether the switch was open or closed.  Now, it would be one Dynamic block, with two different states...

Just thinking out loud

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Curly Bracket
« Reply #26 on: September 19, 2008, 10:13:18 AM »
What are the odds of the dynamic blocks somehow changing states by mistake / bug in the system, etc?  Like, a visibility action dependant an on / off status.

I/we have never had any issues with anything like that.
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

jnieman

  • Guest
Re: Curly Bracket
« Reply #27 on: September 19, 2008, 10:15:42 AM »
I've -never- had a Visibility State of a dynamic block change without intentionally doing it myself, or resetting the block or something... never 'accidentally' or because of a bug.

That's all I know.  I don't recall seeing reports of misbehavior either.  Not claiming that I have a good knowledge of that topic though... just that I hadn't come across a problem.

M-dub

  • Guest
Re: Curly Bracket
« Reply #28 on: September 19, 2008, 10:17:38 AM »
Using it for One-Line's? That's what I created it for.

Not right now, but yes, we use them for that as well.
Not being a one-line kind of guy, how would that be used for one-lines?

I had to look for a while, but I found one.  It's an UGLY one, but there's an example of use in a single line diagram.

M-dub

  • Guest
Re: Curly Bracket
« Reply #29 on: September 19, 2008, 10:19:14 AM »
What are the odds of the dynamic blocks somehow changing states by mistake / bug in the system, etc?  Like, a visibility action dependant an on / off status.

I/we have never had any issues with anything like that.

Thanks guys... I was just curious.  Never know what might happen if the drawing gets compressed / zipped, emailed, saved as different versions, etc.  Not that I thought it would be a major issue, but it's definitely something to think about, anyway.

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Curly Bracket
« Reply #30 on: September 19, 2008, 10:20:13 AM »
Ahhh... I see.


Dude... If I were you, I would make ALL of those symbols dynamic with a mask and alignment parameters.  You could then blow through those diagrams in no time at all.
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

M-dub

  • Guest
Re: Curly Bracket
« Reply #31 on: September 19, 2008, 10:23:38 AM »
Ahhh... I see.


Dude... If I were you, I would make ALL of those symbols dynamic with a mask and alignment parameters.  You could then blow through those diagrams in no time at all.

I would like to!  I have been thinking about it since I HEARD of dynamic blocks.  We have tons of blocks that could be rendered obsolete by new dynamic ones.

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Curly Bracket
« Reply #32 on: September 19, 2008, 10:31:02 AM »
Ahhh... I see.


Dude... If I were you, I would make ALL of those symbols dynamic with a mask and alignment parameters.  You could then blow through those diagrams in no time at all.

I would like to!  I have been thinking about it since I HEARD of dynamic blocks.  We have tons of blocks that could be rendered obsolete by new dynamic ones.

What are you waiting for?  C'mon, man!!  You wanna climb that corporate ladder, right?!?  So what are you waiting for??  C'mon!  Do it!  DO IT!  DO IT!!!

<insert annoying Ty Pennington catch phrase 'Let's d-o-o i-i-i--i-i-i--i-i-t' here>
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io