I don't have experience with AutoCAD files and java, but per your comment regarding C#...You can use the AutoCAD .NET API with C# or VB.net. There is also the ObjectARX library for C++. These are shipped with AutoCAD and are typically used for building AutoCAD plugins. If you don't have...
c#,null,nullable,autocad,autocad-plugin
The Autocad Point3d is a struct. Hence it can't be null, it always has a value. At most, you can test it for invalid numbers. Possibly there is a Point3d.Empty static property to test against. If you want it to be able to be null, use Point3d? which makes the...
Yes, AutoCAD console is part of AutoCAD (full install). But you can use the webservice AutoCAD I/O to batch process drawings, check at http://developer.autodesk.com...
autocad,cad,autodesk,autocad-plugin,autolisp
It is in essence the difference between qsave (quick save) and Save (full save). If Isavepercent is at 50 the qsave command saves changes to the dwq by "Appending" it to the database. Ones the wasted space is at 50% the next save will be a Full save. This used...
c#,.net,autocad,autocad-plugin
I think your problem is here : ObjectId blockId = _dataBase.Insert(Guid.NewGuid().ToString(), sourceDb, false) the _Database object is not the database you are in when using method GetExternalBlock. Personally I would use the WblockCloneObjects Method to get a block from an external drawing. my code: public bool GetExternBlok(string filePath, string blockName)...
Sounds like you're looking for something like this. Remove the layer criteria if not needed. public ObjectIdCollection SelectAllPolylineByLayer(string sLayer) { ObjectIdCollection retVal = null; try { // Get a selection set of all possible polyline entities on the requested layer PromptSelectionResult oPSR = null; TypedValue[] tvs = new TypedValue[] {...
I advise you to take this file and to open it in AutoCAD 2005. And try to restore the file with the standard tools of AutoCAD 2005. File -> Utilities -> Recover. After this click SAVE in the 2000 format. And then open it in the working AutoCAD 2002 version....
c#,.net,autocad,autocad-plugin
I paste you some code as example for the different prompts : using System; using System.Collections.Generic; using Autodesk.AutoCAD.EditorInput; using Autodesk.AutoCAD.Geometry; using Autodesk.AutoCAD.ApplicationServices; namespace EditorUtilities { /// <summary> /// Prompts with the active document ( MdiActiveDocument ) /// </summary> public class EditorHelper : IEditorHelper { private readonly Editor _editor; public EditorHelper(Document...
After some trying, I've found the answer myself. It seems it was as simple as changing the release version from 18 to 19, becoming: (setq ddeconv (ddeinitiate "AutoCAD.r18.DDE" "System" )) ...
Try this example by Wayne Brill: http://adndevblog.typepad.com/manufacturing/2013/06/use-or-with-defaultacquisitionoption-to-download-checkout-with-acquirefiles.html Code for reference: private static void downloadFile (VDF.Vault.Currency.Connections.Connection connection, VDF.Vault.Currency.Entities.FileIteration file, string folderPath) { var settings = new VDF.Vault.Settings.AcquireFilesSettings(connection); settings.AddEntityToAcquire(file); settings.DefaultAcquisitionOption =...
If you create a double-click handler that connects to the Application.BeginDoubleClick event, and you can uniquely identify the entity you're clicking on (I'd use an Xrecord on the entity) you can accomplish what you need. Once you have the entity objectid and you know the user has double-clicked, you can...
Here is the DXF reference for arcs according to AutoDesk: Group codes Description 100 Subclass marker (AcDbCircle) 39 Thickness (optional; default = 0) 10 Center point (in OCS) DXF: X value; APP: 3D point 20, 30 DXF: Y and Z values of center point (in OCS) 40 Radius 100 Subclass...
You need to call setCanonicalMediaName with the correct paper size available. Check the sample below [CommandMethod("SetClosestMediaNameCmd")] public void SetClosestMediaNameCmd() { Document doc = Application.DocumentManager.MdiActiveDocument; Database db = doc.Database; Editor ed = doc.Editor; PlotSettingsValidator psv = PlotSettingsValidator.Current; // Let's first select the device StringCollection devlist = psv.GetPlotDeviceList(); ed.WriteMessage("\n--- Plotting Devices ---");...
When working with AutoCAD (or any other interop) that is likely to change version numbers between development and production or even bitness (x64 vs x86) it is better to use dynamics in C# (object in VB) rather than using references. In order to have the accurate properties and methods in...
In short, you cannot completely protect your DVB source files. As you discovered, information on breaking the password protection is readily available and trivial for a tech savvy user to do. If your goal is to prevent users from just taking the DVB file with them and using it elsewhere...
One way would be to find all intersection points and redraw the polyline segments for each grid, then delete the original polylines. The article at the following link might help: http://www.acadnetwork.com/index.php?topic=181.0...
If creating a *.scr file is not a problem, make it like this CIRCLE 0,0 20 0,100 0,200 100,300 That is - after each coordinate make 2 blank lines (first line is for diameter, second to execute command "circle" again) It would be the same if you were writing CIRCLE...
To effectively read a .dwg file you'll need to open AutoCAD, otherwise the information is not accessible. Some properties may be, such as author, but not number of layouts... But you can use AutoCAD Console (accoreconsole.exe) to run a headless AutoCAD and use APIs to read any information you need....
I have found a solution to my problem. I still could not get the bubble sort to work, so I created my own, that takes no more time to run then the bubble sort. I'll post in case it helps anyone. Private Function SortFsChartRow(collection As collection) As collection Dim min...
The drag and drop handler for the AutoCAD document window is not a command. There is no built-in command that creates an mtext entity from the contents of a text file.
mesh,autocad,raytracing,triangulation
You can collect the details of geometry by creating your own implementation of WorlDraw and ViewportDraw with the AutoCAD .NET API: http://adndevblog.typepad.com/autocad/2012/07/get-entity-geometry-using-custom-worlddraw-and-viewportdraw.html
So after working through several APIs and websites I contacted Kean Walmsley from Autodesk Developer Network and even he told me there was no direct way to get access to the pivot of a group. So now I'm saving a user defined basepoint inside AutoCAD and whenever I need a...
This should be enough to get you going on the right path: Note: oVpId is the Viewport's ObjectId, oId is the Layout's ObjectId Dim oLay As LayerTableRecord = TryCast(oTr.GetObject(oId, OpenMode.ForWrite), LayerTableRecord) oLay.GetViewportOverrides(oVpId).Color or .Linetype ...
python,activex,autocad,comtypes
I found the solution here: You have to uncomment two line, for me it's 862 and 863 in Python27\Lib\site-packages\comtypes\automation.py then it works with getAttributes()...
.net,autocad,autocad-plugin,objectarx
I asked this on the Autodesk forums and learned that the documentation for the interop dll's can be found by looking up the documentation for the old VBA interface.
Do a release build before opening it in AutoCAD and it seems to work fine! Apparently it wasn't compiling all the libraries into the debug build.
It's definitely possible. Once you have the block inserted into your active drawing, you can modify the existing attribute values or open the block table record and add entirely new entities. Here's a couple of blog articles to get you started: http://adndevblog.typepad.com/autocad/2012/06/inserting-a-block-with-attributes-to-modelspace.html http://help.autodesk.com/view/ACD/2015/ENU/?guid=GUID-2107599E-9405-4D8B-A6DD-83D603B41568...
In summary: use Editor.Getselection so the user can select the entities create a blockTableRecord (BTR) on the BlockTable (from Database.BlockTableId) append all entities to the newly created BTR, here you may need to create new entities or move ownership (see BlockTableRecord.AssumeOwnershipOf method) create a new blockreference that points to the...
Why don't you just calculate them manually? Or you can use the com document object which executes synchronously. public static void SendCommandSynchronously(this Document doc,string command) { var acadDoc = doc.AcadDocument; acadDoc.GetType().InvokeMember( "SendCommand", System.Reflection.BindingFlags.InvokeMethod, null, acadDoc, new[] { command + "\n" }); } This is an extension method you can use....
As you can see from web-sites such as this one, there's no "one format to rule them all." Every CAD program (like every other computer program ...) wound up defining "its own, app-specific format." AutoCAD is just one of many. But there are also various "standard" (sic ...) formats ......
The scale factor only controls the scale of the linetype. To change the way the lineweight displays on the screen, right click on the "Show/Hide Lineweight" toggle at the very bottom, click "Settings..." and adjust the slider labelled "Adjust Display Scale". Note that this will not change the printed weight...