Author Topic: Xref 2 Block  (Read 9117 times)

0 Members and 1 Guest are viewing this topic.

T.Willey

  • Needs a day job
  • Posts: 5241
Re: Xref 2 Block
« Reply #45 on: January 23, 2006, 02:15:57 PM »
Thanks Tim

; error: no function definition: OBJMATRIX

Gary

What I fixed was soemthing I saw in a code by Joe Burke.  When he got the answer (matrix) from the function "ObjMatrix" he turned it into a variant, and then passed the variant to (vla-transformedby.... , and that seemed to work here also.  Make sure you have the lisps that he provided loaded, or it will error.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

GDF

  • Water Moccasin
  • Posts: 2055
Re: Xref 2 Block
« Reply #46 on: January 23, 2006, 02:24:52 PM »
Thanks Tim

I found the function from the previous post.

WORKS GREAT.

Thank You....and my coworker thanks you.

Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

T.Willey

  • Needs a day job
  • Posts: 5241
Re: Xref 2 Block
« Reply #47 on: January 23, 2006, 02:29:03 PM »
So you didn't have any problems after running it?  Your CAD didn't crash?
That is cool.  My setup here is a little weird, but that is how the company wants it.  Glad it works for you.

You're welcome, and so is Frank.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

GDF

  • Water Moccasin
  • Posts: 2055
Re: Xref 2 Block
« Reply #48 on: January 23, 2006, 02:44:09 PM »
Tim

Works great in 2006, with no problems. I will add a warning and instruction message to display before the routine is run.

WOW this is great. We will be using this all of the time now. Thank you.

Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

GDF

  • Water Moccasin
  • Posts: 2055
Re: Xref 2 Block
« Reply #49 on: January 23, 2006, 02:48:36 PM »
Sorry, I forgot to thank Joe Burke for his help.

Gary <with a big smile on my face>.
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

Joe Burke

  • Guest
Re: Xref 2 Block
« Reply #50 on: January 24, 2006, 04:12:40 AM »
Hey Joe,

  Thanks for the Matrix codes.  I have been working one some (trying to understand them) and I came up with the same rotation calculations that you did, and they both don't seem to work correctly.  Maybe I'm using them wrong I don't know.  What I'm doing here is:

I get all the objects from the selected xref.
I copy them into the current drawing, into a new block definition.
I then apply the functions you provided to the xref selected.
I then apply the returned matrix to each object.
I then insert the block, hoping that it matches what is on the screen now
but the rotation is wrong, but the scaling is right.

What am I doing wrong?
Thanks in advance.

Hi Tim,

I'm replying to the above and your later message after you found the solution.

I don't understand. Are you saying you did not get an error when the vlax-tmatirx function was not included? Just that the result was incorrect? if so, that is strange. I would expect TransformBy to choke without the conversion vlax-tmatrix does.

Were you doing this: (vlax-invoke obj 'TransformBy <raw matrix>)? I haven't tried it. I guess there's a chance TransformBy, called that way, might accept that.

Joe Burke

  • Guest
Re: Xref 2 Block
« Reply #51 on: January 24, 2006, 04:13:52 AM »
Sorry, I forgot to thank Joe Burke for his help.

Gary <with a big smile on my face>.

Gary,

My pleasure.

T.Willey

  • Needs a day job
  • Posts: 5241
Re: Xref 2 Block
« Reply #52 on: January 24, 2006, 11:03:30 AM »
I don't understand. Are you saying you did not get an error when the vlax-tmatirx function was not included? Just that the result was incorrect? if so, that is strange. I would expect TransformBy to choke without the conversion vlax-tmatrix does.

Were you doing this: (vlax-invoke obj 'TransformBy <raw matrix>)? I haven't tried it. I guess there's a chance TransformBy, called that way, might accept that.

I got no error when (vlax-invoke obj 'TransformBy <matrix list <of list>>).  It would rotate, but it would rotate the wrong way.  Not sure why that happened, but switching to (vla-TransformBy obj (vlax-tmatrix <matrix list <of list>>)) worked.

Thanks again for the codes Joe.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.