Jump to content

Recommended Posts

Posted

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.

Posted

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.

Posted

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.

Posted

2009 IS new to me :)

 

Can you issue a Regen All before selection? (Just guessing)

Posted

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)?

Posted

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.

Posted

Dave,

 

A "ThisDrawing.Regen acAllViewPorts" didn't change anything.

Posted

please paste the bit of code relevant would have helped maybe in first post.

Posted

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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...