Tyke Posted September 14, 2010 Posted September 14, 2010 I have a routine that selects all the text on a specific layer and then rotates the text to a specific angle. If I have zoomed out so I can see all of the drawing and run the routine, everything is fine. But if I zoom in on part of the drawing and then run the routine not all of the text entities are rotated. The ones that are visible and those just outside of the screen area are rotated. Has anyone come across this problem before and if so is there a solution. I could always force a zoom extents, rotate the text and then zoom previous, but its not very clean. Quote
dbroada Posted September 14, 2010 Posted September 14, 2010 I was expecting you to be using an old version of Acad when I read that. One thing that has changed over the years is that the "L"ast object used to be the last drawn object visible on the current screen. It is now the very last object drawn. That caught me out a few times with scripts and I started putting in zoom extents, zoom previous just to make sure I got what I needed. or to put it another way, I don't know another solution and I hope you find one as I'm interested too. Quote
Tyke Posted September 14, 2010 Author Posted September 14, 2010 Dave, Just to be complicated, this is running on a machine with AutoCAD 2009, not on my machine with 2011. I'll try running it on 2011 and get back to you. Quote
Tyke Posted September 14, 2010 Author Posted September 14, 2010 Nope, it's just the same in 2011 Quote
dbroada Posted September 14, 2010 Posted September 14, 2010 2009 IS new to me Can you issue a Regen All before selection? (Just guessing) Quote
SEANT Posted September 14, 2010 Posted September 14, 2010 How are you picking the selection set? It sounds like you are using either: acSelectionSetWindow acSelectionSetCrossing If so, does the selection need to be restricted to an area (i.e., could you use a filtered acSelectionSetAll)? Quote
Tyke Posted September 14, 2010 Author Posted September 14, 2010 Sean, I am using a filtered acSelectionSetAll. No the selection set does not need to be restricted to an area, it must take in the whole drawing. Quote
Tyke Posted September 14, 2010 Author Posted September 14, 2010 Dave, A "ThisDrawing.Regen acAllViewPorts" didn't change anything. Quote
BIGAL Posted September 14, 2010 Posted September 14, 2010 please paste the bit of code relevant would have helped maybe in first post. Quote
Tyke Posted September 14, 2010 Author Posted September 14, 2010 Here's the bit of code: ThisDrawing.Utility.GetEntity obj, bsPT, "Pick text on text layer to be rotated ..." Set SelLay = ThisDrawing.Layers.Add(obj.Layer) SelectedLayer = SelLay.Name fType(0) = 0 fData(0) = "TEXT" fType(1) = 8 fData(1) = SelectedLayer ' regen all ThisDrawing.Regen acAllViewports ' this was for Dave Set ssText = AddSS("TEXT") ssText.Select acSelectionSetAll, , , fType, fData Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.