LayoutManager.Current.CurrentLayout = LayoutName
btblRec = CType(tr.GetObject(db.CurrentSpaceId, OpenMode.ForWrite), BlockTableRecord)
db.CurrentSpaceId returned the ObjectID of the ModelSpace and not of the Layout set current.
Is there something that could prevent this from happening?
I have a bit of code that batch processes from a template drawing. It all works fine until I get to the SaveAs() function. I have narrowed down the problem to have something to do with the drawing starting and saving in a paperspace layout. When I run the code with the template saved in model space it works fine but whe the current tab is a paperspace layout I get an error during the saveas() function "eInvalidInput"
I am using VS2008 and Autocad 2011. Is there a difference in saving with a paperspace layout current?
In the hatch dialogue there is a setting to target the hatch to a specific layer. How does one set the default to ALWAYS be "Use Current"?
Attached jpg shows the target layer as ffbrg, but I want that to ALWAYS read "Use Current" when creating a NEW hartch. In other words, I am happily working in a specific layer creating all these hatches and then realize LATER that all the hatches were in different layers causing great confusiion and havoc.
Is it possible to set a viewport's visual style without opening the drawing in the editor? I would like to set a visual style on all viewports for a batch of drawings.
As a followup, could the viewport then be part of a publish event and have the new visual style hold without opening and reneging the drawing?
Is there a macro/script/deisel that will automatically print a pdf (cute pdf autocad lt 2007) to current plot settings in current drawing directory and give it the current drawing view name and number? Disk space not a problem these days and would save time to have a pdf copy of all drawing tabs readily stored in the directory ready for issue.
Technique that can check the current plotter name for the current tab and assign it to a variable? i.e. can it be assigned to a variable to check if if equals "myplotter1". The next step - is there a technique to change the plotter name to "myplotter2.pc3".
I have partially done the latter part of this in the past using the -plot command line to ASSIGN a new plotter but I would really like to only run the routine if it really needs to.
I have 1 Next button that is used on the timeline. Each position has a pause then a play so there is only 1 button. I need to get the label info so I know where I am so I can save the location of the timeline that the user was at if they exited before they finished the process.
Best practices for setting up systems in a lab environment. We have a lab enviroment of about 200 systems that access AutoCad, Inventor, Mechanical and others.
We need to have a customized interface come up when Autocad is opened by students.I have read that you can do this with profiles and workspaces and also with loading a acad.lsp file.
In the past we have just copied the Windows admin profile used to customize AutoCad to the default profile. In AutoCad 2013 that does not seem to grab everything. It doesn't seem to be the best way to do what we need.
We will also be moving to Windows 7 soon which will also cause an issue.I want to find the best way to do this with out having to deal with the Windows profile.
I have a bit of a problem with Autocad map 3d 2012. When i try to insert a scale bar or a north arrow or any other carthographic element i simply can't find the layout elements that are supposed to be in layout tools tab. I've done a lot of research online and can't come up with anything.
I use illustrator for several things.So i really need to use shortcut's.But there is one big problem : I have the english version of illustrator and i have a German keyboard layout.An example :
To blank a shape u use '/' ( English Version ) To blank a shape u use '#' (German Version )
I can't use '/' cause i have to press shift+/ ... I dont know its not working.Can i change the "Shortcut-Layout" and use the German layout ?
How can I get the current selection set? Editor.Get Selection() will prompt for a new selection, but I would like to check if the user has selected objects before running the command.
I would like to get the current AutoCAD View name in .NET.
Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor.GetCurrentView().Name always returns "", even when viewing a View with a name.
I have existing .NET code that adds page setups to drawings. I now wanted to set the newly added page setup as "current" within the drawing.
The "manual" way to do what I am asking is by clicking the "Set Current" button from within the Page Setup Manager dialog. How would I do this programmatically?
I have a small application that zooms on an entity with specific properties. The problem is that if I am in paperspace and the entity is in model space, i cannot see the entity. How can I make the entity's space to become the current space?
I would like to change current WCS to the object's UCS.
In AutoCAD I manually do this:
a) WCS -> OBject.
b) I'm selecting object;
c) PLAN.
I wrote this
if (sourceObject is Entity) { Entity ent = (Entity)sourceObject as Entity; Point3dCollection pts = new Point3dCollection(); ent.GetStretchPoints(pts); Point3d pt = pts[0]; double viewsize = (double)Application.GetSystemVariable("VIEWSIZE");
[Code]....
how to set current coordinate system to the object's UCS?
Getting the [current] x,y position of the crosshairs seems stupidly difficult! Also, while I can see the event handlers in the object browser, there are a lot and not much input. I'm trying to project different temporary graphics based on where the users mouse is on the screen - I'm happy to do it in increments to make it faster but I've been trying to capture this:
PointMonitorEventHandler
thinking it would be best, but that seems to fire :
args.Context.LastPoint
only once. and I don't need this to only fire when over an entity so much as for every certain amount of mouse movement..I'm about to break down and run the whole thing through screen mouse api calls and convert to viewport x,y as I go, but surely someone needed the live x,y of the crosshairs before now?
When I use trim or extend commands and have to zoom or pan to select additional objects the command drops selection in previous view and only edits items in current view when executed.
Is there a system variable I can use to change this little time waster?
Is it possible to rotate an object to thecurrent UCS. I use UCS object quite a bit and want to align text to the mycurrent UCS without having to align it to an object. i.e. to select the text andsimply rotate it around the justify point to a set angle relative to the current view.
I have a circle that I would like to move ‘Z’ direction along the Current UCS. The Current UCS can be in any 3d plane.The code that I have only moves the circle 5 units up along the WCS.
Dim Zp As New Vector3d(0, 0, 5) Zp.TransformBy(ed.CurrentUserCoordinateSystem)myCircle.TransformBy(Matrix3d.Displacement(Zp))