View Full Version : Extrusion Direction for text entities?
ralphsanchez
2007-04-26, 03:05 PM
We just had a novice drafter do a little annotation in one of our drawing files and we noticed that when she was done with it, the UCS would change when grip editing any of her text entities. I eventially tracked this behavior down to non zero values for the "extrusion direction" settings (DXF codes 210,220,230). As far as I know, there isn't a way for a user to modify those settings without directly accessing the DXF codes. Does anyone know how she could have changed these values? Attached is an R12 DXF file which exhibits the symptoms that I'm describing.
jaberwok
2007-04-26, 04:55 PM
The text is in a UCS that is slightly "off" from the WCS.
Not hard to do, unfortunately.
ralphsanchez
2007-04-26, 05:37 PM
Thanks for the feedback. Can you explain how it happens? I've never known of the ability to change the UCS of an entity. I do know about the extrusion direction DXF codes, and I do know that in this case, 210, 220, and 230 are NOT equal to zero. But I've never known of a method to edit those values without code.
The text is in a UCS that is slightly "off" from the WCS.
Not hard to do, unfortunately.
jaberwok
2007-04-26, 06:03 PM
Thanks for the feedback. Can you explain how it happens? I've never known of the ability to change the UCS of an entity. I do know about the extrusion direction DXF codes, and I do know that in this case, 210, 220, and 230 are NOT equal to zero. But I've never known of a method to edit those values without code.
I'd assume that a strange UCS was created and set current before the text items were entered. Why? I've no idea. :-(
I'd assume that a strange UCS was created and set current before the text items were entered. Why? I've no idea. :-(That is strange,
Sometimes people set a different UCS for hatching and things like that.
Maybe this novice got into a drawing with a different UCS ofher than WCS that was already set by someone else, or maybe they set it themselves and started working?
A mystery...
PS, the "flatten" command seemed to fix it.
ralphsanchez
2007-04-26, 07:06 PM
I've tested this theory, but I can't seem to get the current UCS (whatever it may be set to) to modify the extrusion direction values for mtext or dtext entities that I create.
I'd assume that a strange UCS was created and set current before the text items were entered. Why? I've no idea. :-(
jaberwok
2007-04-26, 07:08 PM
I've tested this theory, but I can't seem to get the current UCS (whatever it may be set to) to modify the extrusion direction values for mtext or dtext entities that I create.
Wouldn't that depend on both the coordinate system used to create the object and the coordinate system used whilst interrogating the object?
ralphsanchez
2007-04-26, 07:09 PM
Thanks for the info, Ted. I had already whipped up some lisp code to fix it, but I just wanted to make sure that it didn't happen in the future.
I tested jabberwok's theory by setting a wonky UCS in a blank drawing and then drawing a few mtext and dtext entities. Under this test, the entities acted normally when grip editing them after setting the UCS back to WCS.
PS, the "flatten" command seemed to fix it.
Thanks for the info, Ted. I had already whipped up some lisp code to fix it, but I just wanted to make sure that it didn't happen in the future.
I tested jabberwok's theory by setting a wonky UCS in a blank drawing and then drawing a few mtext and dtext entities. Under this test, the entities acted normally when grip editing them after setting the UCS back to WCS.I think it may have had a UCS set at an odd 3d angle. I tried doing a "change" to your "funky text.dxf" and it told me it wasn't parallel to the ucs (wcs) which makes me think some how the ucs was set in a wierd 3d plane before the text was placed.
ralphsanchez
2007-04-26, 07:20 PM
Under my test conditions in a new drawing, regardless of the UCS that was set when the objects were created, any text entity that I create shows no information for extrusion direction when listing the entity under any UCS. Therefore, when I go back to WCS, the text entities grip edit just fine.
On the other hand, in the DXF that I attached to my original post, the LIST command actually shows values for "Extrusion direction relative to UCS". These values represent DXF codes 210, 220, and 230, and I still don't understand how our new drafter was able to modifty these values (at least not after the test above).
Thanks again for all of your help.
Wouldn't that depend on both the coordinate system used to create the object and the coordinate system used whilst interrogating the object?
ralphsanchez
2007-04-26, 07:24 PM
Nevermind... I just figured it out. My test UCS wasn't wonky enough. I had to twist it about X _and_ Y by some arbitrary angle to reproduce what she had done.
Thanks again jab & ted.
Under my test conditions in a new drawing, regardless of the UCS that was set when the objects were created, any text entity that I create shows no information for extrusion direction when listing the entity under any UCS. Therefore, when I go back to WCS, the text entities grip edit just fine.
On the other hand, in the DXF that I attached to my original post, the LIST command actually shows values for "Extrusion direction relative to UCS". These values represent DXF codes 210, 220, and 230, and I still don't understand how our new drafter was able to modifty these values (at least not after the test above).
Thanks again for all of your help.
I tested my theory and I was able to duplicate the problem.
I created a UCS using different points (elevations) in the z direction and created some text.
got back into WCS and listed it and it had some of the same problems.
Maybe you can have everyone's system be set in the WCS when opening drawings.
Acad.lsp?
Anyone know how to set that?
(setvar "ucsbase" world) ??
(setvar "worlducs" 1) ??
(neither of these work)
ccowgill
2007-04-27, 11:11 AM
I tested my theory and I was able to duplicate the problem.
I created a UCS using different points (elevations) in the z direction and created some text.
got back into WCS and listed it and it had some of the same problems.
Maybe you can have everyone's system be set in the WCS when opening drawings.
Acad.lsp?
Anyone know how to set that?
(setvar "ucsbase" world) ??
(setvar "worlducs" 1) ??
(neither of these work)
Try
(command "UCS" "WORLD")
Try
(command "UCS" "WORLD")
Thanks, I tried this, but couldn't get that to work either.
I don't think you can run a command on start up of a drawing, or maybe there's another way?
There's got to be a way, this AutoCAD for crying-out-loud!
:confused:
(thanks)
jaberwok
2007-04-27, 12:27 PM
Chris's code should work.
ccowgill
2007-04-27, 04:43 PM
Thanks, I tried this, but couldn't get that to work either.
I don't think you can run a command on start up of a drawing, or maybe there's another way?
There's got to be a way, this AutoCAD for crying-out-loud!
:confused:
(thanks)
if you create a file called acaddoc.lsp and place it in your first support file path, and put my code it it, it should automatically run in every drawing you open. acad.lsp might be set to only load in the first drawing of a session, which may give the appearance of it not working.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.