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

AutoCAD Customization: Visual LISP, AutoLISP and General Customization: How to Migrate my Custom Tool Palettes and Toolbars

$
0
0

How do I migrate my Custom Tool Palettes and Custom Toolbars from Civil 3D 2012 to Civil 3D 2014?

 

What files do I need to create or copy to transfer to 2014?

 

My Custom Tool Palette consists of Block Symbols, Border Sheets, Scales and Seals, Lisp Routines etc.

 

My Custom Toolbar is just a number of standard cad commands I've put together in my toolbar like Revision Cloud, Layer Isolate, Match Properties, Attach Image, etc.

 

Do I need to export out my cui file, do I need to create a Profile file, do I need to setup the same directory structure naming and copy my files into those same directory names?

 

Or is there some easy  hidden Magic Button in Civil 3D that you click on and it does the rest?


AutoCAD Customization: Autodesk ObjectARX: passing string to custom objects through a managed wrapper

$
0
0

I'm working on a mixed code project - Custom DBX objects wrapped and used in vb.net, ala polysamp or even simplesquare examples.

 

I've got most things going good - lot of work but still, it's going. oddly one of the harder things to do is pass string data into the wrapper due to the curse of unicode.  I'm sure there is a way to do this (i've seen the StringToWchar and WcharToString functions but failed to get use out of them).

 

Anyhow anyone got advice on this? I'll put all the (relavent) code below:

 

The variable in the custom object class:

 

const wchar_t* m_Suburb;

 

the get / set declarations in the class:

 

std::string getSuburb();
Acad::ErrorStatus setSuburb(std::string Suburb);

 

and [my attempts at] the definitions for them:

 

std::string SectionObject::getSuburb()
{

std::wstring ws;
ws = m_Suburb;
std::string str(ws.begin(),ws.end());
return str;
}

 

Acad::ErrorStatus SectionObject::setSuburb(std::string Suburb )
{
std::wstring widestr = std::wstring(Suburb.begin(), Suburb.end());

const wchar_t* widecstr = widestr.c_str();
m_Suburb=widecstr;
return Acad::eOk;
}

 

and the declaration for the wrapper of the property:

 

property std::string Suburb
{
std::string get ();
void set(std::string suburb);
}

 

...the definition of the wrapper:

 

std::string BCHF::SectionObjectWrap::mgSectionObject::Suburb::get()
{
return (GetImpObj()->getSuburb());
}

 

void BCHF::SectionObjectWrap::mgSectionObject::Suburb::set(std::string value)
{
Autodesk::AutoCAD::Runtime::Interop::Check(GetImpObj()->setSuburb(value));
}

 

 

 

and the only other relavent thing is the initialization in the constructor:

 

SectionObject::SectionObject () : m_SectNumber(1)
, m_Suburb(_T("s"))//<- here is the init for string - this i'm really making up, no idea how to initialize a wchar....
, m_ShowSectNumber(false)
, m_ShowArea(false)
, m_TxtMspace(0,0,0)
, m_TxtSizeMspace(0.0)
, m_Normal(0,0,1)
, m_pManaged(NULL) {
}

 

anyone else been here? I can't find much discussion about this, so any ideas appreciated :)

oh, and is there anyone to disable these smiley faces in code snippets?!?!? lol.

 

AutoCAD Customization: .NET: Lock an Instance of AutoCAD object

$
0
0

Hi Everyone!

 

My question is kind of simple. How do I lock down an AutoCAD instance object that I created? This is so that the AutoCAD instance that I created can work in the background without responding to user if they open up another drawing. That drawing that the user open has to be opened in another AutoCAD instance.

Something similar in Excel is Application.IgnoreRemoteRequests.

 

Thanks,
Alex

AutoCAD Customization: Visual LISP, AutoLISP and General Customization: make all object you select into one with foreach

$
0
0

I need to make all the obj like one pol after I select them all not just the last one so I can get the intersection of each obj1

 

(DEFUN C:CHF ()
    (vl-load-com)
  (if (not (member "geomcal.arx" (arx)))
    (arxload "geomcal")
    )
  (command "undo" "BE")
(setq osm (getvar "osmode"))
  (setvar "osmode" 0)
  (defun *error* (msg)
    (if objs (foreach pol objs (redraw pol 4)))
    (cond ((not msg))                                                   ; Normal exit
          ((member msg '("Function cancelled" "quit / exit abort")))    ; <esc> or (quit)
          ((princ (strcat "\n** Error: " msg " ** ")))                  ; Fatal error, display it
    )
    (princ)
  )
  (foreach obj '(b)
  (while (setq obj (entsel "\nSelect object:"))
  (setq pol (car obj))
  (setq pt (cadr obj))
  (setq ptn (osnap pt "NEA"))
  (setq pt (vlax-curve-getClosestPointTo (vlax-ename->vla-object pol) pt))    
  (setq objs (cons pol objs))
  (redraw pol 3)
    (if (null b)
     (princ)
      )
    )
    )
      (foreach obj1 '(a)
    (while (setq obj1 (entsel "\nSelect part of object to change: "))
      (setq pt1 (cadr obj1))
      (setq pol1 (car obj1))
      (setq pt1n (osnap pt1 "NEA"))
      (setq int (vlax-invoke
          (vlax-ename->vla-object (car obj))
          "intersectwith"
          (vlax-ename->vla-object (car obj1))
          acExtendBoth)
    )
      (setq int1 (list (car int) (cadr int) (caddr int)))
      (setq int2 (cdddr int))
      (setq objs (cons pol objs))
         (if (null a)
     (command cancel)      
     )
      (setvar "osmode" 183)
      (command "undo" "E")      
      (princ)(*error* nil)
  (princ)
        )
  )
  )

AutoCAD Customization: .NET: VB.Net - Print PDF

$
0
0

Dear All,

 

I can not figure out how to print my autocad drawings from a dedicated folder to pdf from a Visual Studio App.

So far, I can open a Autocad Drawing, upload the PC3 and PMP Files but can not figure out how to select a particular PaperSpace (called "A3 - ENGLISH").

 

Here below the code I have...I am pretty sure it can be simplify.

 

Imports System
Imports System.IO
Imports System.Text
Imports Autodesk.AutoCAD.Interop
Imports Autodesk.AutoCAD.Interop.Common
Imports System.Data.SqlClient
Imports System.Data.OleDb
Imports Microsoft.Office.Interop
Imports System.Runtime.InteropServices
Imports Excel = Microsoft.Office.Interop.Excel


Module Mdl_Print
    Dim AcadApp As AcadApplication
    Dim AcadDoc As AcadDocument

    Public Sub PDF_Print()

        Dim dirInfo As New DirectoryInfo(Frm_Main.LblFolder1.Text)
        Dim fileInfo As FileInfo



        Dim AcadApp As AcadApplication = New AcadApplication
        AcadApp.Visible = True
        AcadApp.WindowState = AcWindowState.acMax
        Dim success As Boolean = False


        For Each fileInfo In dirInfo.GetFiles("*.dwg") 'dwg for Autocad
            AcadDoc = AcadApp.Documents.Open(fileInfo.FullName)


            Dim oSS As AcadSelectionSet
            oSS = AcadApp.ActiveDocument.SelectionSets.Add("oSS")
            oSS.Clear()


            Try
                Dim ftype(0) As Int16
                Dim fdata(0) As Object
                ftype(0) = 410  'layout
                fdata(0) = "A3 - ENGLISH"

                oSS.Select(AcSelect.acSelectionSetAll, , , ftype, fdata)

                Dim objPrefFiles As AcadPreferencesFiles
                Dim PC3PathOld As String
                Dim PC3PathNew As String
                Dim PMPPathOld As String
                Dim PMPPathNew As String

                Dim PtConfigs As AcadPlotConfigurations
                Dim PlotConfig As AcadPlotConfiguration
                Dim PtObj As AcadPlot
                Dim BackPlot As Object

                'Set the preferences object
                objPrefFiles = AcadDoc.Application.Preferences.Files

                'Get the current Printer Config Path (pc3)
                PC3PathOld = objPrefFiles.PrinterConfigPath
                MessageBox.Show(PC3PathOld, "old Printer Config path (pc3)")
                objPrefFiles.PrinterConfigPath = "C:\Users\ROBERT\Documents\Deb + Herve + Will\B - Herve\Technip\Autocad\1st project\OpenExcel\PC3 Files"
                PC3PathNew = objPrefFiles.PrinterConfigPath
                MessageBox.Show(PC3PathNew, "new Printer Config path (pc3)")

                'Get the current Printer Desc Path (pmp)
                PMPPathOld = objPrefFiles.PrinterDescPath
                MessageBox.Show(PMPPathOld, "Printer Desc Path (pmp)")
                objPrefFiles.PrinterDescPath = "C:\Users\ROBERT\Documents\Deb + Herve + Will\B - Herve\Technip\Autocad\1st project\OpenExcel\PMP Files"
                PMPPathNew = objPrefFiles.PrinterDescPath
                MessageBox.Show(PMPPathNew, "Printer Desc Path (pmp)")



                PtObj = AcadDoc.Plot
                AcadApp.ActiveDocument.AcPlotType.acExtents()

                PtConfigs = AcadDoc.PlotConfigurations
                ''Add a new plot configuration
                PtConfigs.Add("PDF", False)
                '''The plot config you created become active
                PlotConfig = PtConfigs.Item("PDF")
                
                ''Use this method to set the scale
                PlotConfig.StandardScale = AcPlotScale.acScaleToFit
                ''Updates the plot
                PlotConfig.RefreshPlotDeviceInfo()

                'Here you specify the pc3 file you want to use
                PlotConfig.ConfigName = "Herve.pc3"

                'You can select the plot style table here
                PlotConfig.StyleSheet = "monochrome.ctb"

                'You can select the Scale Line Weight
                PlotConfig.ScaleLineweights = True

                'Specifies Paper Size
                PlotConfig.CanonicalMediaName = "ISO_A3_(420.00_x_297.00_MM)"

                'Specifies whether or not to plot using the plot styles
                PlotConfig.PlotWithPlotStyles = True

                BackPlot = AcadDoc.GetVariable("BACKGROUNDPLOT")
                AcadDoc.SetVariable("BACKGROUNDPLOT", 0)

                'Updates the plot
                PlotConfig.RefreshPlotDeviceInfo()
                MessageBox.Show("scale" & PlotConfig.StandardScale)
                MessageBox.Show("canonical media name" & PlotConfig.CanonicalMediaName)
                MessageBox.Show("config name" & PlotConfig.ConfigName)
                MessageBox.Show("plot type" & PlotConfig.PlotType)
                MessageBox.Show("scale line weight" & PlotConfig.ScaleLineweights)

                'Now you can use the PlotTofile method
                If PtObj.PlotToFile(Replace(AcadDoc.FullName, "dwg", "pdf"), PlotConfig.ConfigName) Then
                    AcadDoc.Utility.Prompt(vbLf + "PDF Was Created")
                Else
                    AcadDoc.Utility.Prompt(vbLf + "PDF Creation Unsuccessful")
                End If

                'If you wish you can delete the plot configuration you created programmatically, and set the 'BACKGROUNDPLOT' system variable to its original status.
                PtConfigs.Item("PDF").Delete()
                PlotConfig = Nothing
                AcadDoc.SetVariable("BACKGROUNDPLOT", BackPlot)

                objPrefFiles.PrinterConfigPath = "C:\Users\ROBERT\AppData\Roaming\Autodesk\AutoCAD 2014\R19.1\enu\Plotters"
                objPrefFiles.PrinterDescPath = "C:\Users\ROBERT\AppData\Roaming\Autodesk\AutoCAD 2014\R19.1\enu\Plotters\PMP File

                oSS.Clear()

                If AcadDoc.Saved Then
                    AcadDoc.Close(False)
                End If
                AcadDoc = Nothing
                AcadApp.Quit()

                AcadApp = Nothing
                success = True
            Catch ex As Exception
                MsgBox(ex.Message + vbLf + ex.StackTrace)
                success = False
            End Try
            '            AcadDoc.Close()
            AcadDoc = Nothing
            '            AcadApp.Quit()
        Next
        AcadApp.Quit()
    End Sub


 Thank you

Herve

AutoCAD Customization: .NET: Area Command

$
0
0

 (command "_.AREA" "_E" (entlast))    

 

 I want to do the above mentioned process in .net....   

 

  Please guide me how to do?

AutoCAD Customization: Visual Basic Customization: External Reference

$
0
0

Hi Guys,

 

I need some assistance. Is their a way to know or extract the file type or file extension

of an Extrenal Reference file?

 

Thanks in advance....

AutoCAD Customization: .NET: I am facing problem with SaveAs API.

$
0
0

Hello,

 

I am facing problem with SaveAs API which is when called to save the top drawing of one or above level structure we don’t receive call back for “SaveComplete” event. When we call SaveAs API, it is expected to receive first call back for BeginSave event and then SaveComplete event. But we don’t receive the call back for SaveComplete event.

Below is the scenario:

  1. Create a drawing say, “TopDrawing” and attach another drawing (as xRef) say “ChildDrawing” to the “TopDrawing”.

 

e.g TopDrawing

           |_

              ChildDrawing

 

  1. Save the drawings.
  2. Now modify the “ChildDrawing”.
  3. After this we are using following SaveAs API for the “TopDrawing”.

 

            inline Acad::ErrorStatus saveAs(const ACHAR* fileName,

                             const SecurityParams* pSecParams = 0);

 

Observations:

 

After using this API we receive call back for “BeginSave” event. But we are not receiving call back for “SaveComplete” event.

 

Due to this we are not able to save the TopDrawing after the modification of its reference. This issue is observed in more than one level structures also.

 

This is observed with AutoCAD2010,11,12 and 13.

 

 

Expected Results:

 

We should receive call back to SaveComplete following to the call back for BeginSave event in order to save the structure correctly.

 

Please update me what needs to be done if I want to get result as I am expecting after using SaveAS API.

 

Also provide me the information about the libraries which are used for SaveAs function.

 

Thank you very much.

 


AutoCAD Customization: Autodesk ObjectARX: AcDbPolyline vs AcDbRegion in custom entity.

$
0
0

I designed a custom entity which has an AcDbEntity* member. If I set the color on my custom entity, the member entity is drawn in that color if it is a polyline, but if it is a region, the color stays on "by-layer". Does this make sense? Why the difference?

 

// -----------------------------------------------------------------------------------------

///

<sumary> Provides rendering instructions. </summary>

/// -----------------------------------------------------------------------------------------

Adesk::Boolean Element::subWorldDraw(AcGiWorldDraw* dc)

{

     AcGiDrawable* drawable = static_cast<AcGiDrawable*>(_primitive);

  if(drawable)

    {

        dc->geometry().pushModelTransform(Translation());

        drawable->worldDraw(dc);

        dc->geometry().popModelTransform();

     }

   return Adesk::kTrue;

}

 

 

AutoCAD Customization: Visual LISP, AutoLISP and General Customization: help generating blocks with attributes from equipment list in csv format

$
0
0
Hi I'm not sure what the way to go about doing what I want. I have a pretty extensive equipment list that I want to drive the deneration of simple plan represenations - each would be a rectangle with width and length and maybe some text fields identifying the obect. Does anyone have any solutions for something like this? Do I need to write it from scratch in LISP? thanks O

AutoCAD Customization: .NET: Selecting Cells in Excel and storing them as Variables in VB.Net

$
0
0

Hello,

While in my AutoCad drawing, I need to be able to select cells in an Excel database and use them as variables to create a drawing.  I've looked on the Internet and have found some bits and pieces of code for particular uses, but what I'm looking for is the methodology, or some training/examples on working with Excel and AutoCad using VB.net.

Any help will be greatly appreciated.

 

Thanks,

Mark

AutoCAD Customization: .NET: display DWG attributes in aspx page

$
0
0

Hi Folks - VERY new to AutoCAD here.  I have a bunch of dwg files (100+) that are Piping and Instrument Diagrams for a refinery.  The files sit on a network folder.  The filenames are rather cryptic.  i.e. 00-P-2-77894.dwg  this refers to a location/section in the refinery.  In the network directory there is an excel file with all dwg files listed with additional meta data.  (Document Title, Created On, Last Modified by, etc...)  This is a pain to keep up.  I would like to develop an aspx page as a replacement for the excel file that simply lists (ala Windows Explorer Details view) all dwgs in a folder (including columns for filename, Document Title, Created On, etc...).  I found the OpenARX SDK.  I have a new c#.net website created with references to AcCoreMgd, AcDbMgd, and AcMgd.  But after that im stuck.  I can iterate through all files in the dir no problem but I'm not sure how to pull attribute information from the dwg files.  All examples that I see involve opening the dwg up in some type of viewer and issuing commands.  Thats not what I want.  I need an aspx page that iterates through a directory of dwgs and lists the attributes in a tabular format.  ANY help is appreciated.

AutoCAD Customization: Visual LISP, AutoLISP and General Customization: Layer translator lisp

$
0
0

I found a lisp in an old post and I edited it alittle with my own layers to have it change to but when I use it, it doesn't deleted the extra layers. It says layer cannot be deleted. Below is part of the code that I am using, I didn't copy all of them since there are alot of layers in the lisp that I added. Any help would be great. maybe I copied something wrong I am not sure.

 

 

{code}
( defun c:FIXMYLAYERS ( / ss_newlayer change_en )
( setq layerlist ( list ( cons "ENB_ROW-1" "ENB-ROW-1" )
( cons "Border_Condoc_DwgMgmt_Large$0$G-ANNO-TTLB" "DefPoints" )
( cons "Border_Condoc_DwgMgmt_Large$0$G-ANNO-TTLB-LOGO" "DefPoints" )
( cons "Border_Condoc_DwgMgmt_Large$0$G-ANNO-TTLB-NPLT" "DefPoints" )
( cons "Border_Condoc_DwgMgmt_Large$0$G-ANNO-TTLB-TEXT" "DefPoints" )
( cons "Border_Condoc_DwgMgmt_Small$0$G-ANNO-TTLB-LOGO" "DefPoints" )
( cons "Border_Condoc_DwgMgmt_Small$0$G-ANNO-TTLB-NPLT" "DefPoints" )
( cons "Border_Condoc_DwgMgmt_Small$0$G-ANNO-TTLB-TEXT" "DefPoints" )
( cons "DEFPPOINTS" "DefPoints" )
( cons "E-ANNO-REVC-0001" "AE NOTES" )
( cons "E-ANNO-REVC-0002" "AE NOTES" )
( cons "E-ANNO-REVS-0001" "AE NOTES" )
( cons "E-ANNO-REVS-0002" "AE NOTES" )
( cons "E-CLNG" "CEILING" )
( cons "ED-FIRE-CLNG" "AE FIRE ALARM" )
( cons "ED-LITE-SWCH" "AE ELECTRICAL" )
( cons "E-DP-2D$0$AD-BLDG" "FLOORPLAN" )
( cons "E-DP-2D$0$AE-AREA-IDEN" "ROOM TAG" )
( cons "E-DP-2D$0$AE-AREA-OCCP" "ROOM TAG" )
( cons "E-DP-2D$0$AE-DOOR" "FLOORPLAN" )
( cons "E-DP-2D$0$AE-EQPM" "EQUIPMENT" )
( cons "E-DP-2D$0$AE-EQPM-OVHD" "EQUIPMENT" )
( cons "E-DP-2D$0$AE-EQPM-UNDR" "EQUIPMENT" )
( cons "E-DP-2D$0$AE-FLOR" "MISC" )
( cons "E-DP-2D$0$AE-FLOR-CASE" "FURNITURE" )
( cons "E-DP-2D$0$AE-FLOR-CASE-OVHD" "FURNITURE" )
( cons "E-DP-2D$0$AE-FLOR-CASE-UNDR" "FURNITURE" )
( cons "E-DP-2D$0$AE-FLOR-EVTR" "MISC" )
( cons "E-DP-2D$0$AE-FLOR-OVHD" "MISC" )
( cons "E-DP-2D$0$AE-FLOR-SPCL" "MISC" )
( cons "E-DP-2D$0$AE-FLOR-STRS" "FLOORPLAN" )
( cons "E-DP-2D$0$AE-FLOR-STRS-HRAL" "FLOORPLAN" )

( cons "E-DP-2D$0$AE-AREA-IDEN" "ROOM TAG" )
( cons "AE FIRE ALARM" "AE FIRE ALARM" )

( cons "TOPO-FENCE-200" "FENCE-200" )
( cons "HATCH-250" "HTCH-250" ) );list
);sq
( foreach item layerlist
( if ( and ( tblsearch "Layer" ( car item ) )
( not ( tblsearch "Layer" ( cdr item ) )) );a
( command "-Layer" "Rename" ( car item ) ( cdr item ) "" )
);i
);fe

( setq ss_newlayer ( ssget "X" ))
( while ( setq change_en ( ssname ss_newlayer 0 ))
( setq ss_newlayer ( ssdel change_en ss_newlayer ))
( if ( assoc ( cdr ( assoc 8 ( entget change_en ))) layerlist )
( entmod ( subst ( cons 8 ( cdr ( assoc ( cdr ( assoc 8 ( entget change_en ))) layerlist ))) ( assoc 8 ( entget change_en )) ( entget change_en ) ))
);i
);w

( foreach item layerlist
( if ( tblsearch "Layer" ( car item ) )
( command "-Layer" "Delete" ( car item ) "" )
);i
);fe
( princ "\nFinished:" )(princ ))
{code}

AutoCAD Customization: Visual LISP, AutoLISP and General Customization: LISP Routines

$
0
0

Here is the simple LISP routine that we used before with metric units, now we are in an American project and the routine is giving me 12 times the actual plant coordinate.  Having a drawing set on plant coords it also gives a NORTH and a negative EAST.  Does the Dimension Style have some changes to be made to show the leader with the text on true plant coords?  Thank you for the help!!!

AutoCAD Customization: .NET: viewing window in autocad with .net

$
0
0
is there a control to add a viewing window in a dialog so that the it shows a drawing such as a rectangle in the viewing window as you change the width and height in the dialog.

AutoCAD Customization: .NET: Test for duplicate handles

$
0
0

How would I test for duplicate handles in a file. If I select a cirlce from an xref and it has a handle of "E6" Then I select another circle from a different xref that has the same handle. When I use GetObjectId how do I specify which handle? Is there a way to give a handle and a file path and have it point to the correct entity or would I need to cycle through all entities and check for matching handle and file name?

 

In the end I would like to select an object, then store that data in a file and then recall that exact same object later.

 

Thanks,

matt

AutoCAD Customization: .NET: How to focus Autocad when click Button in form

$
0
0

Hi All,

Now, I have a problem with Form. This is. When i press button in Form(i want to draw line in Autocad), If i want to draw line in autoca, I have to click twice. I want to ask everyone. How can i only click once into cad and draw this line. I have used Application.ShowModalDialog() but my form will hide. and when my form appear so i can not click continue to cad. Thanks all. i use cad 2013.

AutoCAD Customization: .NET: Add drawings to active project

$
0
0

Hello everyone,

 

I encountera problemthatI 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 mehtod 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.

 

The problem:

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 doensn't matter.

 

Can anyone help me with this problem?

 

Thanks in advance.

AutoCAD Customization: .NET: Parametric Constraints

$
0
0

Hello All,

 

Currently i am doing a customization in Autocad which is related to parametric dimensions. 

 

What i am trying to do is to fetch all the dimensions of Parametric dimension and display in Custom Window form, so that when ever the user wants to change the dimension user can change from this form which we design. 

 

Earlier i had done in dynamic block, but i am afraid that might not be accepted. 

 

Any ideas on how to access Parametric dimension and display in combobox and if user changes it shud get reflected in drawing.

 

 

rgds

Amit

AutoCAD Customization: .NET: Display of Proxygraphics when saving dwg using ReadDwgFile?

$
0
0

I want to handle multiple DWG files containing MagiCAD proxy elements.

 

An easy and very fast method is to access the files using the ReadDwgFile

Database db = new Database(false, true);
using (db)
{
db.ReadDwgFile(dwgfile.FullName,FileOpenMode.OpenForReadAndAllShare,true,null); // open the dwg file

 And then save the files using:

db.RetainOriginalThumbnailBitmap = true;    // retains thumbnail previw image
db.SaveAs(dwgfile.FullName, true, DwgVersion.AC1024, null);

 However, when using this method, the display of MagiCAD proxy entities are not saved. The DWG fil still contains the proxy entities, it's just the AutoCAD representation of the elements that have been altered.

 

Is there a method to handle 3rd party applications when using the .ReadDwgFile?

 

Viewing all 1680 articles
Browse latest View live


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