Quantcast
Channel: Autodesk India Community aggregator
Viewing all 1680 articles
Browse latest View live

AutoCAD Customization: .NET: Compiling - Platform

$
0
0

Hello Forum,

 

I used to compile my .NET dll (C#, AutoCAD 2012) for platform "Any CPU". But recently I get the following warning:

 

There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "acdbmgd", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 

When I change the platform to "x64", the warning is gone, but I get the following error when I try to load the dll in AutoCAD:

 

NETLOAD Assembly file name: C:/test.dll Cannot load assembly. Error 
details: System.IO.FileNotFoundException: Could not load file or assembly 
'file:///C:\test.dll' or one of its dependencies. 
The system cannot find the file specified.
File name: 'file:///C:\test.dll'
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String 
codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, 
StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, 
Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName 
assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, 
StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, 
Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName 
assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, 
StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean 
forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, 
Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm 
hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, 
StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(String fileName)
   at loadmgd()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value 
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure 
logging.
To turn this feature off, remove the registry value 
[HKLM\Software\Microsoft\Fusion!EnableLog].

 As far as I know, I did not change anything in the code or project (windows .NET update?).  What can I do to fix the warning?

 

Ty for any help/insight.

 

 

 

 

 


AutoCAD Customization: Visual LISP, AutoLISP and General Customization: A little help please?

$
0
0

I have put my books on AutoLISP away last year as I thought I was done with CAD. As I still haven't found them, could some help me decipher this line.

 

{\fArial|b0|i0|c0|p34;\H15.767x;<>}

 

It was used in the replace text of a dimension.

I know that <> is the symbols for the correct text, not something replaced. I am sure the Arial in the font used. The rest is absolutely new to me, and I am curious what it means, and how I can use it in the future.

The last part you should know. When I tried to put a dimension in, the font of the Dim stayed tiny. Even when the text size was changed, the dimension "text" stayed very in tiny. (All text at this company is going into model space). When I matched properties, the arrow heads changed sizes. Only after I entered the code did the actual font/text change sizes.

COuld someone help me with the code.

HullDrafter

AutoCAD Customization: Visual LISP, AutoLISP and General Customization: Lisp to set DWS CAD standards file?

AutoCAD Customization: .NET: using com intero to plot layouts

$
0
0

Hi guys I am using com intero  to plot layouts, the code goes well untill reach the plotToFile() line and  the visual studio produces error message as attached in the image and text file.

I tried so many time to change in the string path "//" but the same error and using @ at the begginning also the same, as I think that the string may pruduce this error.

 

 

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Autodesk.AutoCAD.Interop.Common;
using Autodesk.AutoCAD.Interop;

using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.PlottingServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Geometry;

[assembly: CommandClass(typeof(ZFP_BatchPlotTest_2014.PlottingFunction))]
namespace ZFP_BatchPlotTest_2014
{
    
    public class PlottingFunction
    {
        [CommandMethod("ppdf", CommandFlags.Modal)]
        public void PlotPDF()
        {
            AcadApplication app = (AcadApplication)Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication;
            AcadLayouts LayoutsCOLL = app.ActiveDocument.Layouts;
            string strLayOutName;
            //AcadLayout cadLayout;
            //string strModel;

            foreach (AcadLayout cadlayout  in LayoutsCOLL)
            {
                app.ActiveDocument.SetVariable("backgroundplot", 0);
                if (app.ActiveDocument.GetVariable("tilemode") == 1)
                {
                    app.ActiveDocument.SetVariable("tilemode", 0);
                }

                app.ActiveDocument.ModelSpace.Layout.RefreshPlotDeviceInfo();
                strLayOutName = cadlayout.Name;
                app.ActiveDocument.ActiveLayout = cadlayout;
                if (strLayOutName != "Model")
                {
                    app.ActiveDocument.Regen(AcRegenType.acAllViewports);
                    app.ActiveDocument.ActiveLayout.ConfigName = "DWG To PDF.pc3";
                    app.ActiveDocument.ActiveLayout.PlotWithPlotStyles = true;
                    app.ActiveDocument.ActiveLayout.StyleSheet = "FINAL-BK.ctb";
                    app.ActiveDocument.ActiveLayout.CanonicalMediaName = "ISO_A0_(841.00_x_1189.00_MM)";
                    app.ActiveDocument.ActiveLayout.PaperUnits = AcPlotPaperUnits.acMillimeters;
                    app.ActiveDocument.ActiveLayout.PlotRotation = AcPlotRotation.ac90degrees;
                    app.ActiveDocument.ActiveLayout.StandardScale = AcPlotScale.ac1_1;
                    app.ActiveDocument.ActiveLayout.PlotType = AcPlotType.acExtents;
                    app.ActiveDocument.ActiveLayout.CenterPlot = true;
                    //app.ActiveDocument.Plot.DisplayPlotPreview(AcPreviewMode.acFullPreview);
                    app.ActiveDocument.Application.ZoomExtents();
                    //app.ActiveDocument.Plot.PlotToDevice();
                    string strLayoutpath = "L:\\" + strLayOutName + ".pdf";

                    app.ActiveDocument.Plot.PlotToFile(strLayoutpath, app.ActiveDocument.PlotConfigurations);

                }



            }
        }



    }
}

 

thanks for your support

AutoCAD Customization: .NET: How to: Create Viewport from a saved view from the Extents of a rotated block

$
0
0

Hi Guys,

 

Firstly thanks in advance for any help provided.

 

I have a a serires of block sin Model Space (normally Retangular) that define a view.

 

I am trying ti put together some code to Save a View from the extents of that block.

The Create a Layout with 1 viewport and set the view to the saved view.

 

Unfortunatly my .NET skill when using Matrix's are not that good.

 

I am normally good at pieceing together code.... Just the Creation of the View from the block extents is thoughing me....

(Especially due to the rotation and that the Insert Point is not at the lower left corner of the block)

 

Any help would be greatly appricated.

 

Thanks.

AutoCAD Customization: Visual LISP, AutoLISP and General Customization: invalid or incomplete DXF input - drawing discarded

$
0
0

I am getting an error message "invalid or incomplete DXF input - drawing discarded" but there is no extra message on line-error or something like that.

The error only occurs in Autocad 2013 and 2014. There was no problem in versions previous to 2013. Does anyone know what the issue can be.

At the moment I can only resolve it by opening the drawing in an older version and save the DXF as Autocad v12. This makes me wonder if there are commands in the DXF-file that don't exist in Autocad 2013 or 2014.

 

AutoCAD Customization: .NET: Extracting Layer Attributes

$
0
0

Hi Group..!!

 

I am doing one application for autocad designers using VB.Net. In the application we can select one dwg file and extracting the layers inside the drawing..! i did that..but there is one problem. If i clicked on a layer, all layers attributes which is present on the dwg will be extracting... i need one by one depends on the selection of layer.

Can u help me..

AutoCAD Customization: Autodesk ObjectARX: ARX built with objectarx2013 is not compatible with objectarx2014

$
0
0

Hi,

Recently i migrated my project from vs2008 to vs2010, also from object arx 2010 to object arx 2013.

The output arx file works fine with AutoCAD Map 3d 2013, but when trying to load in Map 3D 2014, i get the following error.

 

*************************************** Error receive ******************************************************

c:\program files\Test\validation2013.arx cannot find a dll or other file that it needs.
AcRxDynamicLinker failed to load 'c:\program files\Test\validation2013.arx'
C:\Program Files\Autodesk\Autodesk AutoCAD Map 3D 2014\acad.exeUnable to load validation2013.arx file

 

************************************************************************************************************

 

Thanks in advance

 

 

with regards,

Chockalingam


AutoCAD Customization: .NET: Drawing is busy while SaveAndClose acDoc.

$
0
0
Hi,
I am working on one macro that read drawing names from excel, opens it, do some modification. After that I would need to save and close active drawing. When I use expression acDoc.SaveAndClose(acDoc.Name)
I am getting g an error - drawing is busy. I can save the drawing use save as method without any problems but can save and close it. Do you know what could be an issue? Probably I have to release that drawing or make it active somehow.

Any help is welcome.

Many thanks,
Peter

AutoCAD Customization: .NET: Create Autocad vb.net applciation to work in all Autocad versions

$
0
0

I have written an applciation in vb.net which interacts with AUTOCAD for 2011 version.

 

created object as,

 

Dim AcadApp As AcadApplication

Try
                AcadApp = GetObject(, "AutoCAD.Application.18.1")
            Catch ex As Exception
                AcadApp = CreateObject("AutoCAD.Application.18.1")
            End Try

 

now the applciation needs to be run in 2010 & lower versions.

Can anyone help me out on how to create a object which works for all versions.

 

Thank you.

AutoCAD Customization: .NET: Update Plotter Device List

$
0
0

Recently i discovered that my Plotter Device List is not beeing refreshed after a AutoCAD profile change using:

PlotConfigManager.RefreshList(RefreshCode.All);

 

Neither could i find a Refresh function in the UserConfigurationManager:

Application.UserConfigurationManager.xxREFRESHxx

 

Run the following code twice, before and after a profile change, and for each profile a different  Plotter Configuration Search path.

Notice the differences in the PC3 contents.

 

       [CommandMethod("LPD")]
        public void ListPlotDevices()
        {
            Document doc = Application.DocumentManager.MdiActiveDocument;
            Editor ed = doc.Editor;
            PlotSettingsValidator plotSettingsValidator = PlotSettingsValidator.Current;

            //The Device list generated by the plotSettingsValidator is not refreshed
            //  after a AutoCAD Profile change -- within the same autoCAD session
            PlotConfigManager.RefreshList(RefreshCode.All);
            var pc3ListByPSV = plotSettingsValidator.
                                                   GetPlotDeviceList().
                                                   Cast<string>().
                                                   Where(pd => Regex.IsMatch(pd,"PC3$",RegexOptions.IgnoreCase)).
                                                   ToList();
            ed.WriteMessage("\nPlot Device List by PlotSettings Validator:");
            pc3ListByPSV.ForEach(pd => ed.WriteMessage("\n{0}", pd));

            dynamic acadPreferences = Application.Preferences;
            dynamic acadPrefsFiles = acadPreferences.Files;
            string acadprinterConfigPath = acadPrefsFiles.PrinterConfigPath;
            ed.WriteMessage("\n\nPrinter Config Path:{0}", acadprinterConfigPath);
            var pc3ListByDir = Directory.EnumerateFiles(acadprinterConfigPath, "*.pc3").Select(n => Path.GetFileName(n)).ToList();
            ed.WriteMessage("\nPlot Device List(PC3) by Directory search:");
            pc3ListByDir.ForEach(pd => ed.WriteMessage("\n{0}", pd));
        }

 

Any tips are welcome.

 

 

 

AutoCAD Customization: .NET: Visual Studio 2010 Project Save As

$
0
0

I would like to know what will be the best way to save a visual studio project as, give the assembly a different name and change the framework version from 3.5 to 4.0.  Since VS does not have a save as command, I think I can start a brand new project with the required name and framework version and then import (add existing item) from the old project, classes, forms and modules.  I don't know if this is the best way to go about it or even if this is right way.  Can someone please give me some help and tell me if this is the way to go.

 

I ran into a problem which I posted about a few days ago, I was getting a "Source not available" message.  I think that it was caused by mixing 32bit and 64bit part of projects. I almost could not recover the project I was working on, so I don't want to lose it again.  I have a working project for AutoCAD 2012 that I need to modify to work on AutoCAD 2014.

AutoCAD Customization: Visual LISP, AutoLISP and General Customization: The best method for Attribute Extraction and/or Block replacement?

$
0
0

Hi all,

 

I have a little project to take care of that requires a batch of drawings to have their drawing frame blocks updated & attributes amended/truncated to a specific version and I'd rather not reinvent the wheel by resorting to programming anything using .NET.

 

I've searched the internet/forums and stumbled across a couple of threads/documents:

 

http://forums.autodesk.com/t5/NET/How-to-programmatically-extract-the-attributes-from-a-CAD-file/td-p/4716557

 

http://forums.autodesk.com/t5/AutoCAD-2013-2014-DWG-Format/Block-Replace-in-AutoCAD-2014-does-not-work/m-p/4476983#M33412

 

http://www.widom-assoc.com/AU-CP12-3L.pdf

 

None of which do exactly what I need.

 

What is the "from the horses mouth" workflow/method I should take? Data Extraction Tool/ATTOUT/Another approach I haven't thought of?

 

Thanks,

 

Alex.

AutoCAD Customization: Visual LISP, AutoLISP and General Customization: Attribute value with an embeded non-printable character.

$
0
0

Without going into detial as to just why...

 

I have an block attribute value that is...

 

NAME %%010

 

The %%010 is octal for a non-printing character (10 = a backspace)... so in AutoCAD the text correctly shows up as simply   NAME

(this is what I want)

However when the drawing is printed to PDF format... the value shows as    NAME |

(note the vertical pipe symbol)

 

Any ideas what other octal ascii character I might use to accomplish this?

AutoCAD Customization: Visual LISP, AutoLISP and General Customization: layout to dwg mac2013

$
0
0

Dear all,I use Autocad Mac 2013. Question: How can I export a layout to dwg? Is there a .lisp for Autocad Mac 2013? THANKS


AutoCAD Customization: Visual Basic Customization: Driving AutoCAD 2014 x64 with VB6

$
0
0

Hi,

 

We have some legacy VB6 applications that have been migrated to Win7  x64 bi. These applcations used to interact with AutoCAD 2008 and now we are moving the Win7 x64 bit with AutoCAD 2014. 

 

It is possible in VB6 Application to create Object on AutoCAD.Application19.1 and drive it from there. 

 

This all seems to work fine, but when you start getting into the details of the document,  start seeing type mismatches and executions of the autocad objects that return nothing. 

 

For example, small sample code below trys to set a specific layer that is in the document to the active layer, and I get a type mismatch. The direct assignment just returns nothing (even if the layer is in the active document). Also I have tried a good amount of variations on this call.

 

Set objLayerDirect = m_acadDoc.Layers.Item(UCase(sToLayer))

And tye type mismatch comes in at: 

Set objLayersColl = m_acadDoc.Layers

 

For example:

Public Sub SampleCode()

Dim oApp As AcadApplication
Dim m_acadDoc As AutoCAD.AcadDocument
Set oApp = CreateObject("AutoCAD.Application.19.1")

'do some stuff, ... visible, open doc, etc. (not important)

Set m_acadDoc = oApp.ActiveDocument


    Dim objLayersColl As AcadLayers
    Dim objLayer      As AcadLayer
    Dim objLayerDirect As AcadLayer
    Set objLayerDirect = m_acadDoc.Layers.Item(UCase(sToLayer))
On Error GoTo Error_In_ChangeLayer
    If Not (objLayerDirect Is Nothing) Then
        m_acadDoc.ActiveLayer = objLayerDirect
        GoTo LayerFound:
    End If
    
    
    ' 2nd try with old method...get layers collection
    Set objLayersColl = m_acadDoc.Layers
    ' loop through collection looking for one with a name match
    For Each objLayer In objLayersColl
        If objLayer.Name = UCase(sToLayer) Then
           m_acadDoc.ActiveLayer = objLayer
            GoTo LayerFound
        End If
    Next objLayer
    ''
LayerFound:
    Set objLayerDirect = Nothing
    Set objLayersColl = Nothing
    Exit Sub
End Sub

 

 

My question is does this relate to the 32 bit Active X VB6 exe's driving a 64 bit Autocad? Or should this all be possible to completely use all the Autodesk Active X API commands that are provided? 

 

If so, any ideas why I would get a type mismatch error on looping through the layers?

 

I dont see why we can launch create object, and attach to it and control visiblity and sizing and things like this just fine from VB6 exe connecting to x64 Autocad 2014 - Why wouldn't we have exposure to all of the Active X API commands from 32 bit? 

 

Thanks.

 

 

AutoCAD Customization: Visual LISP, AutoLISP and General Customization: Disable layout thumbnail preview?

$
0
0

Searching around for this answer the closest that I found is: Layout preview thumbnails problems 

The thread seems to dance all around the issue without answering and the OP did not return to asnwer the inquiry.

 

I use many pages in my dwt and that means I have tabs running all the way along the bottom of the screen. Everytime my mouse passes over one of these tabs I get the thumbnail preview pop up in the way of the work I'm doing. I have tried to ingore it for a looong time, but, if it is possible to disable those previews from appearing unintentionally, then please tell me how to disable them.

 

Thank you.

 

( AutoCAD 2013 64bit )

AutoCAD Customization: .NET: declare an array of a Point3d type in C# and resize it

$
0
0
Can somebody help me here? I'm very new to C#.

using System; using System.Collections.Generic; using System.Collections; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; using Autodesk.AutoCAD.ApplicationServices; using Autodesk.AutoCAD.DatabaseServices; using Autodesk.AutoCAD.Geometry; using Autodesk.AutoCAD.Runtime; using Autodesk.AutoCAD.Interop; namespace AutoCADProfileStationing { public class Commands { [CommandMethod("ACADbatch")] static public void Main(string[] args) { OpenFileDialog fdlg = new OpenFileDialog(); fdlg.Title = "C# Corner Open File Dialog"; fdlg.InitialDirectory = @"c:\"; fdlg.Filter = "AutoCAD .dwg files (*.dwg*)|*.dwg*"; fdlg.FilterIndex = 1; fdlg.RestoreDirectory = true; fdlg.Multiselect = true; if (fdlg.ShowDialog() == DialogResult.OK) { foreach (string fName in fdlg.FileNames) { Database db = new Database(false, true); using (db) { try { db.ReadDwgFile( fName, FileShare.ReadWrite, false, "" ); } catch (System.Exception) { return; } Transaction tr = db.TransactionManager.StartTransaction(); using (tr) { DBDictionary layoutDict = (DBDictionary)tr.GetObject(db.LayoutDictionaryId, OpenMode.ForWrite); foreach (DBDictionaryEntry entry in layoutDict) { if (entry.Key != "Model") { Layout layout = (Layout)tr.GetObject(entry.Value, OpenMode.ForWrite); BlockTableRecord layoutBtr = (BlockTableRecord)tr.GetObject(layout.BlockTableRecordId, OpenMode.ForWrite, false); if (!layoutBtr.IsAnonymous) { int count = 0; Line[] callLines = null; Polyline2d profile = null; Polyline2d pipeProfile = null; MLeader myMLeader = null; MLeader ngMLeader = null; MLeader topMLeader = null; int textCount = 0; DBText[] callText = null; Point3dCollection pts = new Point3dCollection(); foreach (ObjectId id in layoutBtr) { Entity ent = (Entity)tr.GetObject(id, OpenMode.ForWrite); Line myLine = ent as Line; if (myLine != null) { if (myLine.Layer == "Profile_Feature") { count = count + 1; callLines[count] = myLine; } } Polyline2d myPLine = ent as Polyline2d; if (myPLine != null) { if (myPLine.Layer == "Profile_Natural Gnd Line") { profile = myPLine; } else if (myPLine.Layer == "Profile_As-Built") { pipeProfile = myPLine; } } MLeader tempLeader = ent as MLeader; if (tempLeader != null) { if (tempLeader.Layer == "Text_Profile" && tempLeader.MText.Text == @"{\C1;5' COV.}" && tempLeader.GetVertex(0, 0).X < 250) { myMLeader = tempLeader; } else if (tempLeader.Layer == "Text_Profile" && tempLeader.MText.Text == @"{\C1;NATURAL GROUND}" && tempLeader.GetVertex(0, 0).X < 250) { ngMLeader = tempLeader; } else if (tempLeader.Layer == "Text_Profile" && tempLeader.MText.Text == @"{\C1;AS-BUILT T.O.P.\P20"" NGL PIPELINE}" && tempLeader.GetVertex(0, 0).X < 250) { topMLeader = tempLeader; } } DBText myText = ent as DBText; if (myText != null) { textCount = textCount + 1; callText[textCount] = myText; } } Point3d profileMid; Point3d pipeProfileMid; profileMid = profile.GetPointAtDist(profile.Length / 2); pipeProfileMid = pipeProfile.GetPointAtDist(pipeProfile.Length / 2); Point3d[] intPoint = new Point3d[callLines.Count()]; try { for (int i = 1; i < callLines.Length +1 ; i++) { intPoint[i] = callLines[i].IntersectWith(profile, Intersect.ExtendThis, pts, IntPtr.Zero, IntPtr.Zero); } } catch (System.Exception) { return; } } } } } } } } } } }

 

AutoCAD Customization: .NET: Problem with WblockCloneObject - AutoCAD 2014, vb.net

$
0
0

I'm using Civil 3D 2014 to return an objectID collection of polylines from the active document. Once I have the collection I am passing it along with the document database to the function below. The function opens an existing document and then performs a WblockCloneObject of the polylines into the newly opened document.

 

This function works about have of the the time. The other half I get an Access Violation when executing the WblockCloneObject statement. I've included the link to the Autodesk source document from which I adapted this function.

 

Anyone have any ideas or suggestions?

 

Thanks,

Rod

 

 

''''''''''''''''''''''''''''''''''''''''''' Adapted from: http://docs.autodesk.com/ACD/2013/ENU/index.html?url=files/GUID-E02A8AAF-61FF-4C72-8960-0AEEBBEC2594.htm,topicNumber=d30e720156'' objIDCol is created from Civil 3D Corridor.Baseline.FeatureLineMap.FeatureLineCollection.FeatureLine.ExportAsPolyline3dCollection()
    '
    Public Function CopyObjectsToNewFile(ByVal outFileName As String, ByRef docSourceDB As Database, ByRef objIDCol As Autodesk.AutoCAD.DatabaseServices.ObjectIdCollection) As Boolean
        Dim docMgr As DocumentCollection = Application.DocumentManager
        Dim docDest As Document
        Dim docDestDB As Database

        CopyObjectsToNewFile = False

        If IsNothing(docSourceDB) Then
            MsgBox("Source document database is nothing")
            Exit Function
        End If

        docDest = DocumentCollectionExtension.Open(docMgr, outFileName, False)
        If IsNothing(docDest) Then
            MsgBox("Cannot open " & outFileName)
            Exit Function
        End If

        docDestDB = docDest.Database

        '' Lock the new document
        Using acLckDoc As DocumentLock = docDest.LockDocument()

            '' Start a transaction in the new database
            Using acTrans = docDest.TransactionManager.StartTransaction()

                '' Open the Block table for read
                Dim acBlkTblNewDoc As BlockTable
                acBlkTblNewDoc = acTrans.GetObject(docDestDB.BlockTableId, _
                                                   OpenMode.ForRead)

                '' Open the Block table record Model space for read
                Dim acBlkTblRecNewDoc As BlockTableRecord
                acBlkTblRecNewDoc = acTrans.GetObject(acBlkTblNewDoc(BlockTableRecord.ModelSpace), _
                                                      OpenMode.ForRead)

                '' Clone the objects to the new database
                Dim acIdMap As IdMapping = New IdMapping()

                docSourceDB.WblockCloneObjects(objIDCol, acBlkTblRecNewDoc.ObjectId, acIdMap, _
                                           DuplicateRecordCloning.Ignore, False)


                '' Save the copied objects to the database
                acTrans.Commit()
            End Using

            '' Unlock the document
        End Using

        CopyObjectsToNewFile = True
    End Function
    '''''''''''''''''''''''''''''''''''''''''''

 

AutoCAD Customization: Visual LISP, AutoLISP and General Customization: end a command when a variable is equal to NULL

$
0
0

(cond

( null pt3)

(command "angbase" 0 "angdir" 0)

and here I want to exit the command I have this (command command) but ; error: bad argument value: AutoCAD command: #<SUBR @000000003176d6d8 COMMAND> comes up

Viewing all 1680 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>