TheSwamp

CAD Forums => CAD General => Dynamic Blocks => Topic started by: Mark on December 07, 2007, 11:00:40 AM

Title: ( acad 2006 vanilla ) dynamic block & hatch
Post by: Mark on December 07, 2007, 11:00:40 AM
For some reason, in this one particular drawing, when ever I flip the block the solid hatch that's part of it stays behind. I've tried everything I can think of! *baffled*
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: MP on December 07, 2007, 11:05:04 AM
Dump the hatch object so we can see its data?

Code: [Select]
(   (lambda ( / ename )
        (if (setq ename (car (nentsel)))
            (progn
                (vlax-dump-object (vlax-ename->vla-object ename))
                (mapcar 'print (entget ename '("*")))
            )
        )
        (princ)
    )
)
   
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: daron on December 07, 2007, 11:06:10 AM
Could you post a drawing of the block itself?
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: Guest on December 07, 2007, 11:06:51 AM
For some reason, in this one particular drawing, when ever I flip the block the solid hatch that's part of it stays behind. I've tried everything I can think of! *baffled*


The one thing I've noticed with hatch patterns in DBs is that AutoCAD sometimes needs to be reminded that something has changed.  Does it look correct if you do a REGEN after flipping it?  I have to do that sometimes even with '08.
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: Mark on December 07, 2007, 11:09:33 AM
Dump the hatch object so we can see its data?

Code: [Select]
; IAcadHatch2: AutoCAD Hatch2 Interface
; Property values:
;   Application (RO) = #<VLA-OBJECT IAcadApplication 00c2eb8c>
;   Area (RO) = 0.406802
;   AssociativeHatch = -1
;   Document (RO) = #<VLA-OBJECT IAcadDocument 07056f84>
;   Elevation = 0.0
;   GradientAngle = 0.0
;   GradientCentered = -1
;   GradientColor1 = #<VLA-OBJECT IAcadAcCmColor 0529fd40>
;   GradientColor2 = #<VLA-OBJECT IAcadAcCmColor 052982d0>
;   GradientName = "LINEAR"
;   Handle (RO) = "AE4E"
;   HasExtensionDictionary (RO) = 0
;   HatchObjectType = 0
;   HatchStyle = 0
;   Hyperlinks (RO) = #<VLA-OBJECT IAcadHyperlinks 0529f9c4>
;   ISOPenWidth = 100
;   Layer = "0"
;   Linetype = "ByLayer"
;   LinetypeScale = 1.0
;   Lineweight = -1
;   Normal = (0.0 0.0 1.0)
;   NumberOfLoops (RO) = 1
;   ObjectID (RO) = 2127543920
;   ObjectName (RO) = "AcDbHatch"
;   Origin = (0.0 0.0)
;   OwnerID (RO) = 2127543856
;   PatternAngle = 0.0
;   PatternDouble = 0
;   PatternName (RO) = "SOLID"
;   PatternScale = 1.0
;   PatternSpace = 1.0
;   PatternType (RO) = 1
;   PlotStyleName = "Color_51"
;   TrueColor = #<VLA-OBJECT IAcadAcCmColor 05251710>
;   Visible = -1

(-1 . <Entity name: 7ecfbe70>)
(0 . "HATCH")
(330 . <Entity name: 7ecfbe30>)
(5 . "AE4E")
(100 . "AcDbEntity")
(67 . 0)
(8 . "0")
(62 . 51)
(100 . "AcDbHatch")
(10 0.0 0.0 0.0)
(210 0.0 0.0 1.0)
(2 . "SOLID")
(70 . 1)
(71 . 1)
(91 . 1)
(92 . 7)
(72 . 1)
(73 . 1)
(93 . 9)
(10 0.497657 -0.620711 0.0)
(42 . 0.0)
(10 0.0 0.0 0.0)
(42 . 0.0)
(10 0.397657 -0.720711 0.0)
(42 . 0.0)
(10 0.397657 -0.855079 0.0)
(42 . 0.414214)
(10 0.447657 -0.905079 0.0)
(42 . 0.0)
(10 1.6048 -0.905079 0.0)
(42 . 0.414214)
(10 1.6548 -0.855079 0.0)
(42 . 0.0)
(10 1.6548 -0.670711 0.0)
(42 . 0.414214)
(10 1.6048 -0.620711 0.0)
(42 . 0.0)
(97 . 1)
(330 . <Entity name: 7ecfbe60>)
(75 . 0)
(76 . 1)
(47 . 0.00213631)
(98 . 1)
(10 0.583884 -0.680093 0.0)
(450 . 0)
(451 . 0)
(460 . 0.0)
(461 . 0.0)
(452 . 1)
(462 . 1.0)
(453 . 2)
(463 . 0.0)
(63 . 5)
(421 . 255)
(463 . 1.0)
(63 . 7)
(421 . 16777215)
(470 . "LINEAR")
(-3 ("ACAD" (1010 0.0 0.0 0.0)) ("AcDbBlockRepETag" (1070 . 1) (1071 . 3) (1005 . "AE4E")))
 
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: Mark on December 07, 2007, 11:10:36 AM
Could you post a drawing of the block itself?

I could Daron but it works fine in every other drawing.
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: Mark on December 07, 2007, 11:11:51 AM
Does it look correct if you do a REGEN after flipping it?

Nope! That works in other drawings, just not this one. :-)
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: MP on December 07, 2007, 11:13:12 AM
I could Daron but it works fine in every other drawing.

So don't post the other drawings.

:)
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: Mark on December 07, 2007, 11:20:02 AM
I could Daron but it works fine in every other drawing.

So don't post the other drawings.

:)

fine .... *sigh* :lol:
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: Mark on December 07, 2007, 11:21:13 AM
After deleting everything and purging the .dwg the block works fine in said drawing so .....
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: ronjonp on December 07, 2007, 11:25:04 AM
Mark,

Your stretch action makes the block look funky in 2008. I don't have any problem with the mirror?

Ron
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: Mark on December 07, 2007, 11:33:12 AM
If I open the block in the block editor then close and save, the hatch in the block updates and looks correct. But it's only good for one time.
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: Mark on December 07, 2007, 11:33:54 AM
Mark,

Your stretch action makes the block look funky in 2008. I don't have any problem with the mirror?

Ron

Thanks Ron.
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: Mark on December 07, 2007, 11:42:37 AM
Attached is the .dwg that's giving me the problems. I've stripped most everthing out of it and the block still does not work correctly.
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: ronjonp on December 07, 2007, 11:55:09 AM
That is strange...it breaks here too. I have still not figured out why my block completely loses its dynamic properties in certain drawings. Me thinks Autodesk needs a little bit more time developing them.

http://www.theswamp.org/index.php?topic=20186.0
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: MP on December 07, 2007, 12:01:12 PM
Dunno Mark. DB's are not my area of expertise. Seems to work fine on my 'puter.

{shrug} Sorry?
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: Mark on December 07, 2007, 12:19:59 PM
Dunno Mark. DB's are not my area of expertise. Seems to work fine on my 'puter.

{shrug} Sorry?

thanks for looking! :-)
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: quamper on December 07, 2007, 12:41:30 PM
The hatch isn't part of the selection set for that action.

Your sample shows 5 items in that set.. but it should have 6.

I added the hatch in and it works fine for me now.

I've attached my "fixed" one if that helps.

Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: quamper on December 07, 2007, 12:42:33 PM
Whoops I should mention I only corrected it for the up>down action not the left>right flip. But the same should apply to that.
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: daron on December 07, 2007, 01:06:27 PM
Mark, if you go into the blocks editor and erase the hatch, then redraw and reset parameters, it seems to work.
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: Mark on December 07, 2007, 01:08:37 PM
Mark, if you go into the blocks editor and erase the hatch, then redraw and reset parameters, it seems to work.

I'll try that again.
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: daron on December 07, 2007, 01:10:05 PM
Of course, I didn't see this page while posting. However, it appears that you want to only increase the size of the bubble by horizontal constraints. For that, it would be advisable to use a linear as opposed to polar parameter.
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: quamper on December 07, 2007, 01:11:47 PM
Take a look at the screen shot.. it's easy to see the hatch isn't part of the selection.. which is why it's not moving with the action.
(http://www.theswamp.org/screens/dynamicblockhatch.jpg)
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: Mark on December 07, 2007, 01:27:46 PM
Take a look at the screen shot.. it's easy to see the hatch isn't part of the selection.. which is why it's not moving with the action.

that's weird 'cause it is in mine.
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: daron on December 07, 2007, 01:31:03 PM
Hmm. It looked like it was part of the selection on mine. On second look, you're right, it's not. I still think that polar parameter should be linear. Why would it work on other drawings? I think I can answer that, actually. Pure guess: An accurately built block is or was in the drawings that it is working on of the same name and when this one is brought in via tool palette, it doesn't redefine the old correct blocks, but gets updated itself. Find the source and fix it.
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: quamper on December 07, 2007, 01:31:14 PM
Take a look at the screen shot.. it's easy to see the hatch isn't part of the selection.. which is why it's not moving with the action.

that's weird 'cause it is in mine.


you're looking at your distance parameter.. not the flip action and what's included in it.

Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: daron on December 07, 2007, 01:33:52 PM
Actually, yellow hatch is difficult to tell whether or not it's selected. What does your props window say? Mark, you're selecting the stretch object. Try selecting the flip objects, which are the offenders.
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: daron on December 07, 2007, 01:34:49 PM
Q? You and I are on the same plane with this one. I just seem to be at the back of the plane.
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: Mark on December 07, 2007, 01:37:49 PM
Take a look at the screen shot.. it's easy to see the hatch isn't part of the selection.. which is why it's not moving with the action.

that's weird 'cause it is in mine.


you're looking at your distance parameter.. not the flip action and what's included in it.



Now I feel about this tall. :lol:
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: quamper on December 07, 2007, 01:44:11 PM
Q? You and I are on the same plane with this one. I just seem to be at the back of the plane.

Yeah I agree a linear parameter is probably better, as you have no reason to use a polar one.

Also make sure you set your "dist minimum value" ( in this case I think it's 1.1571) so that it can only "grow" otherwise you get goofy looking results if you stretch it the other direction.

Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: daron on December 07, 2007, 01:45:45 PM
Mark, I know I keep harping on this, but what's the reasoning behind using the polar parameter for your stretch action? I'm only asking to help improve understanding of what, when and how to use different parameters. As I see the use of your application, the polar parameter in this case is about as good as using the point parameter, which are totally useless because the have no restraints. The nice thing about restraints is that if you want to stretch an object perpendicular to a line, you can snap it using any osnap setting and it won't snap in the wrong place. Very useful for speed and accuracy. Also, what Q just said about setting a distance param. You get really strange results sometimes if you don't.
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: Mark on December 07, 2007, 01:55:56 PM
Mark, I know I keep harping on this, but what's the reasoning behind using the polar parameter for your stretch action?

It's all new to me Daron ... in other words I just picked the one that looked right. One of the reasons I started a thread about that block so we/I could learn better techniques.
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: daron on December 07, 2007, 02:07:06 PM
Well, that's what I was hoping; that you were in a learn this thing mode. With you last comment in mind, you shouldn't feel 3 pixels tall. It's all a learning experience and dynablocks can get confusing at first, because there are about 100 ways to move or stretch something. The last place I worked, the guy there in charge of the cad standards used point parameters often. It drove me nuts.
Title: Re: ( acad 2006 vanilla ) dynamic block & hatch
Post by: Mark on December 07, 2007, 02:18:49 PM
I just changed my original to use "Linear Stretch" and you're right, it's much better. Thanks folks!! :-)