AutoCAD .NET :: Creating UCS And Making It Active?
Aug 29, 2013
I am trying to create a new UCS and then making it active. The new UCS coordinate is
Origin(0,0,0)
X direction(1.8963581, 0.36861467, 0.51763809)
Y direction(-0.190809, 0.98162718, 0.0)
View 9 Replies
ADVERTISEMENT
Mar 7, 2014
Since Edge only has rectangles and ellipses built in as available shapes, how to I/we work with polygon shapes and active mouseover areas INSIDE of these shapes and non-active mouseover areas OUTSIDE of the shapes?
Problem/symptom: when I import a polygon, be it any file format from from Photoshop or SVG from Illustrator, a rectangular border/background (transparent) gets applied, leading to this rectangle defining the mouseover area of the shape - and not the shape itself (be it a star or whatever).
WHAT I WANT: the very shape defines the mouseover area. How do I achieve this?? See examle below:
WHAT I DON'T WANT: how is is now:
View 4 Replies
View Related
May 1, 2012
I am creating a border and making it attributed. I have the drawing number showing up in the title block and in the opposite corner of the page. I want to link the two somehow so that when one is edited the other automatically changes to match. Is this possible to do?
View 6 Replies
View Related
Aug 12, 2012
I am making a design for a centrifugal water pump, the rotor was no problem, but I'm having some trouble designing the top case. I thought it would be easiest to create the channel for the water outlet using a loft feature.
I attached the ipt. there are two sketches, and I need a loft from the small to the large one, all the way around the circle. when you see it you'll probably understand what the result should be, but, no matter what I try, either I get an oddly shaped loft, or an error.
View 9 Replies
View Related
Jan 7, 2014
I have been able to make a trace file in grey scale but can't seem to export to a .dxf file. When I do the file show a size when I do a properties but shows noting when I import it to EZCAD.
View 1 Replies
View Related
Feb 17, 2014
After selecting 2 (or more) files and right clicking and choosing Multi camera sequence from source, I drag the newly created sequence on to the time line but all I get is the two files on the time line stacked over one another. the sequence never gets created.
View 3 Replies
View Related
Feb 22, 2012
is there a way to have OSNAP active while not within a command?
I am using PointMonitor to display information based on the position of cursor, but the point is always in z=0 plane.
View 1 Replies
View Related
Dec 4, 2013
I encounter a problem that I do not understand. I created a little C# routine for Autocad Electrical (2011 and 2012) which adds some drawings to the current project with the following command:
(c:ace_add_dwg_to_project dwg2add paramlst)
This method works perfectly. With the parameter list you can set the Section, Sub-Section and Descriptions of the page properties, exactly what I want. When I start the routine, I check which project is active. If the wrong project is active, I activate the appropiate project with the following command:
(c:wd_makeproj_current wdpfnam)
So, when I want to add drawings to project A and project B is active at the start of the routine, I activate project A and the drawings are added. When I want to add drawings to project A and this project is already active, the drawings are not added to the project. The method mentioned above to add drawings returns nill, which means a failure.
Why is this happening? Is this a bug of Autocad?I already tried to always activate the project I want to add drawings to, but that doesn't matter.
View 1 Replies
View Related
Dec 20, 2012
When an macro of a Lisp is active I can zoom and pan in a drawing. I press Escape to quit.Why can't I do that when a form is active in vba? Is that only because Showmodal is on?
View 1 Replies
View Related
Jul 13, 2012
For those of you struggling with viewport scale factors this list might prove beneficial.
Scale Factors – AutoCAD model space drawing using a paper space viewport.
Imperial (architectural)
12”=1’ 1xp
9”=1’ 3/4xp
6”=1’ 1/2xp
4”=1’ 1/3xp
[Code]....
Imperial (engineering)
1”=2000’ 1/24000xp
1”=1000’ 1/12000xp
1”=500’ 1/6000xp
1”=200’ 1/2400xp
[Code]....
Metric
1:5 1/5xp
1:10 1/10xp
1:20 1/20xp
1:30 1/30xp
[Code]...
How to use. Make viewport active. Invoke Zoom command, Scale option, press Enter, input nXP scale factor type, for example, 1/96xp then press Enter.
View 1 Replies
View Related
Apr 13, 2013
I think it's quite a lot of useless work to always select objects before or during a command, if you manipulate the same set of objects over a longer period of time. Say, as an architect I have a floor plan with a table and chairs. Now I want to copy, translate, rotate and scale the table with the chairs until they fit my floor plan. So I have to select the furniture, copy it, select it again, move it, select it again, rotate it, select it again and then scale it. Of course, there is the "previous" option, but is there a way of keeping a selection set active after the command so you just can go on to the next command without re-selecting the whole thing? My favoured workflow would be: Select the objects, copy them, move them, rotate them, then scale them. The objects should be active all the time and deactivated with ESC after the manipulation.
View 3 Replies
View Related
Nov 11, 2011
I want to convert active dwg file to jpg file. How to do ?
View 4 Replies
View Related
Sep 13, 2006
I have an active command that I want to cancel, how can I do this? Right now I'm working with 3dorbit, if that makes a difference.
View 6 Replies
View Related
Nov 15, 2012
using dwgDB.saveas on a drawing database that the user has open but NOT current on his screen?
For example, the user has DWG1 open and DWG2 open and currently active, my program modifies DWG1 (inactive) and when the program tries to run...
dwg1DB.SaveAs(filename, true, DwgVersion.Current, dwg1DB.SecurityParameters)
it errors with an elock violation, even though I lock the document with dwg1DOC.LockDocument before I try to save and unlock it after.
The same code runs fine on the current document so at this time I just ended making the other document current just to save it then switch back to previously current document.
What am I missing to save a document that is open but not current?
View 3 Replies
View Related
May 17, 2012
How to save active drawing file with filename..
View 9 Replies
View Related
Oct 18, 2012
I have several closed ployline shapes in a particular layer, I need to know a way to:
a) pick all the entites on that layer
b) export to a dxf file each individual entity on the layer (yes, each entity saved to a separate dxf)
I am almost positive I can answer 'a' on my own using an object collection and a conditional statement? I am really more interested in how to export an entity from current open drawing to a dxf file in .net
View 1 Replies
View Related
Feb 28, 2012
In the last couple of days civil3d has started not opening a drawing as the active drawing
View 1 Replies
View Related
Jan 24, 2013
How can I stop changing active document? I was thinking I could use this, but I don't know how to cancel it in the event handler:
AcadApp.DocumentManager.DocumentToBeActivated += new DocumentCollectionEventHandler(DocumentManager_DocumentToBeActivated);static void DocumentManager_DocumentToBeActivated(object sender, DocumentCollectionEventArgs e){ // Messagebox to ask if user are sure bool AreYouSureYouWantToChangeActiveFile = MessageBox.... if(!AreYouSureYouWantToChangeActiveFile) //cancel change active file somehow...???}
View 6 Replies
View Related
Jun 3, 2011
How to set or change the active display configuration with .NET. Currently I am sending this task to the command line. See below:
' This subroutine sets the correct display config with the supplied name Public Sub SetCurrentDisplayConfig(ByVal strDisplayConfig As String)Dim strCommand As String = "" strCommand = "-AECDISPLAYCONFIGSETCURRENT " & strDisplayConfig & vbCr AutoApp. Application. DocumentManager. MdiActiveDocument.SendStringToExecute(strCommand, True, False, False) End Sub
View 2 Replies
View Related
May 27, 2013
This error happened to us, when we tried to get the active layout from the acad document. We are using AutoCAD 2009 & C#.NET 4.0 Framework.
The error is as below:
Unable to cast COM object of type 'Autodesk.AutoCAD.Interop.Common.AcadLayoutClass' to interface type 'Autodesk.AutoCAD.Interop.Common.IAcadLayout'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{C6F55F5A-33AF-4B5F-9949-86C6AEEF1834}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
The piece of snippet looks like the following
using Autodesk.AutoCAD.Interop.Common;
AcadApplication acadApp = (AcadApplication)Marshal.GetActiveObject("AutoCAD.Application");
AcadDocument acadDoc = acadApp.ActiveDocument;
//The following line throws the error as stated above
AcadLayout aLayout = (AcadLayout)acadDoc.ActiveLayout;
But it can be accessed if we change the property " Embed Interop Types " of DLLs (a) Autodesk.AutoCAD.Interop
(b) Stdole
from True to False
But again it throws the same error when we try to retrieve any methods from the retrieved AcadLayout. The whole application works fine with AutoCAD 2012 after re-referencing the DLLs.
View 1 Replies
View Related
Mar 23, 2009
I'm trying to set the active Layer filter. I tried myDB.LayerFilters.Root.Name = "Filter1" but it wouldn't work.
View 9 Replies
View Related
Jan 5, 2014
I would like to turn off all the existing layers in active document. I have found in developer's guide how to turn off one layer with specified layer name but can not apply it on all layers with any layername.
I tried to get all the Object ID's in layer table and then for each object turn layer off but seems that it does not work.
<CommandMethod("FilterLayers")> _Public Sub FilterLayers()'' Get the current document and databaseDim acDoc As Document = Application.DocumentManager.MdiActiveDocumentDim acCurDb As Database = acDoc.Database'' Start a transactionUsing acTrans As Transaction = acCurDb.TransactionManager.StartTransaction()'' Open the Layer table for readDim LayerTable As LayerTable = acTrans.GetObject(acCurDb.LayerTableId, OpenMode.ForRead)Dim LayerTableRecord As LayerTableRecord = acTrans.GetObject(LayerTable.ObjectId, OpenMode.ForWrite)For Each ObjectId In LayerTableLayerTableRecord.IsOff = TrueNext'' Save the changes and dispose of the transactionacTrans.Commit()End UsingEnd Sub
View 3 Replies
View Related
Sep 9, 2013
I`m looking for the code which will capture the active window similar to iProperties-->Save--> Capture
View 4 Replies
View Related
Oct 26, 2012
How can I tell when a viewport (any viewport) in paper space is currently active.
This is actually related to a .NET programming error, whereby even when the drawing is in Paper space, if a viewport is active, I am unable to programmatically access the Layout. I need to be able to, at a minimum, detect this condition, then switch back to full paper space (i.e. de-activate the viewport) if possible.
View 4 Replies
View Related
Feb 1, 2012
I need to export the areas of multiple closed polygons to excel and update that excel as soon as the areas change. We've been using an outside contractor who is able to do this using land f/x.
View 2 Replies
View Related
Dec 15, 2011
I want to delete the inital Sketch (if was already opened) that Inventor creates when a new part is added.
I have tried this, but doesn't work.
Sketch sketchActive = docPart.SketchActive.
sketchActive.Delete();
View 4 Replies
View Related
Jan 7, 2014
I want to insert a stored block into a drawing (model space). Below is the code I'm using and I get
Runtime Error '5': Invalid procedure call or argument.
Sub Dummy()
Dim COESTD_obj As AcadBlockReference, InsPtStd(0 To 2) As Long, COESTD As String
COESTD = "C:JimHYDROCAD_DwgsBlocksZ_COE_STDS.dwg"
InsPtStd(0) = 0#: InsPtStd(1) = 0#: InsPtStd(2) = 0# 'Set insertion point as 0,0,0
Set COESTD_obj = ThisDrawing.ModelSpace.InsertBlock(InsPtStd, COESTD, 1#, 1#, 1#, 0#)
End Sub
View 2 Replies
View Related
Jul 30, 2012
I write plug-in for AutoCAD in C# and I have a question. How I can change dws-file in active document?
I know how it's doing in LISP, but not in C#.
View 1 Replies
View Related
Nov 6, 2012
I have written a program that basically replaces certain mvblocks, tags actually, in several drawings, the purpose being to change the displayed label of an object.
I have just 2 of the 3 affected drawings open and just 1 of those 2 is acually active at the time the program runs.When I run the program the tags in the open and active drawing get replaced fine.
The tags in the open but NOT active drawing appear unchanged but a "regen" causes them to go away but the new tags do not appear, if I save, close, and reopen the drawing, as the drawing is reopening I see the new tags but the label text is offset and just prior to the drawing being fully open (back at "command" prompt) the tag text does move to its correct location. a save now saves the drawing correctly so on subsequent openings everything is correct.
The tags in the unopened drawing, when I do open it, once again, I see the new tags but the label text is offset and just prior to the drawing being fully open (back at "command" prompt) the tag text does move to its correct location. a save now saves the drawing correctly so on subsequent openings everything is correct.
Regardless of the state (open, unopen, active, inactive) I am running each drawing through the same subroutines to delete the old tag and put on the new as I am passing the drawing DB to the subroutines, the only difference being that I am putting a document lock on the open drawings documents before I start the subroutines.
I do have the CommandFlags.Session flag set on the command that launches the program. So, what am i missing that the new tags are not showing up in the open but inactive dwg until the drawing is saved and reopened, and then in both, open and inactive and the unopened dwg the label text appears offset until the dwg opens completely?
View 2 Replies
View Related
Mar 26, 2012
How can I do this? A reference dimension was created by a circular pattern and it covers a circle I'm try to select.
View 2 Replies
View Related
Dec 23, 2013
Where are the options to add objects & ActiveX objects to the VBA project? i can reference them but thats it... Have i got to do everything late binding or can i drag an object onto a form in design view?
View 1 Replies
View Related