AutoCAD .NET :: Add Handler To Object In Database?

Jun 2, 2011

what is the best way of getting (modified) event triggered for some specific object?

i see a lot of examples doing: if database is modified, then trigger event, then iterate our list to if that object is in it.

is that the better that way, like to add handler to the specific object, and then when each of them is modified, then each of them call handler?

View 3 Replies


ADVERTISEMENT

AutoCAD Map 3D :: Add Database As Source For Object

Dec 18, 2012

I'm trying to add a database (excel ) as source for object in Map3D.

I start but when i select the excel file that i've created and stored in my pc map3d says that the cration of the data source doesn't work.

View 7 Replies View Related

AutoCAD .NET :: Getting Database Object Of Drawing File?

Aug 8, 2012

How i can get Database object of Drawing file with out opening.

View 1 Replies View Related

AutoCAD Map 3D :: Object Data Linked To External Database

Jul 14, 2011

For some reason, I can't seem to find all the right steps in the right order to accomplish this.  Maybe what I'm trying to do isn't possible.

Using either Map3D 2011 or Map3D 2007:

I have a database (SQL Server) and a drawing (.DWG) with object data fields.  For simplicity, lets say the database field names match the object data field names.  The key field in the object data is already filled in.  I would like to link to the database so the rest of the object data fields are filled from the database.  Is this possible?  If so, how?  The closest I have gotten so far is creating a link template and using mapod2ase, but that creates a separate set of Link Template fields instead of filling in the Object Data fields. 

View 5 Replies View Related

AutoCAD .NET :: VB / Map 3D - Reading Object Data Tables From DWG Inside Database

May 23, 2013

Would you have a solution to accessing ODTables for a dwg object only loaded into memory? I have 1000+ dwgs that I want to return a string with the names of the various ODTable names for auding purposes that I would prefer to just side load rather than full load for performance reasons.

 I'm attempting to use something like this (which works fine on an open drawing):

 Public Function ReturnOBJData(acObjIDIn As ObjectId, intOffset As Integer) As String   
 'Don't forget that table is 0 based offset so....plan accordingly    Dim strRet As String = ""    
Dim acDoc As Document = Application.DocumentManager.MdiActiveDocument    
Dim acDb As Database = acDoc.Database    Dim acEd As Editor = acDoc.Editor
[Code] .......

In a fashion along the lines of

Public Function GetTables(strFileIn As String) As List(Of String)    
Dim lstReturn As New List(Of String)    
Dim acMapApp As MapApplication = HostMapApplicationServices.Application    
Dim acActiveProject As Project.ProjectModel = acMapApp.ActiveProject    
Dim acTableList As Tables = acActiveProject.ODTables    Dim acTable As ObjectData.Table   

[Code] ....

The problem is that I can't seem to link the ODTables object off of the memory database object. In this sample, the msgbox always returns a count of 0 where I would expect it to be in the range of 1-4.

View 6 Replies View Related

AutoCAD Map 3D :: Convert Linked Database Info Into Object Data

Jul 7, 2011

I have 200,000 lines with some object data. LINKED to these lines is a database with some more information. Basically I want to export all of these lines to shape files, converting the information in the linked database to be the new object data. (This is for the client to view the lines on ArcGIS).

I have done this a few times in the past, but working with this volume of lines and data, Its taking an extremely long time.

My question is, could i use autolisp to quickly transfer the database data to object data before i export to shape files? or if there are any other options.

View 3 Replies View Related

AutoCAD .NET :: Difference While Doing Customization With Database / Without Database Services

Aug 6, 2013

I am working on the AutoCAD customization and doing the same by VB.Net & C#.Net. But I just want to know the difference as mentioned below:

1. Insert Block In AutoCAD

Using VB.Net without using DataBase services..Only 1 statement is required to Insert the Block objAcadDocument.ModelSpace.InsertBlock(Required Arguments are here) Using C#.Net with DataBase services

There are many statments are there to insert only 1 block..Like Start Transaction, Lock the document, Get the Object Id Block etc...So my quetion is that when I have to use DataBase services and when not 

what is the advantage of doing customization using DataBase services rather than go for wihout DataBase services.?

View 4 Replies View Related

AutoCAD .NET :: Event Handler Triggered Multiple Times?

Jul 15, 2011

I have a SelectionAdded event handler that reacts three times when selecing a single block and once when deselecting it.

If there are two blocks in the drawing but only selected one it reacts 5 or 6 times.

And it reacts every time I pass the mouse over the selected block.

Is there any way to sidestep the events in the handler so that AutoCAD doesn't grind to a halt if I have multiple blocks in the drawing. And decide to move my mouse over all of them?

View 5 Replies View Related

AutoCAD LT :: Error Handler Reentered When Tried To Open Multiple File

Nov 26, 2013

This error (autocad error handler re-entered, Exiting now) happen when i was opening multiple autocad file. After i pressed on the 'ok' button the program close everything without saving the work i had done.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Write Event Handler For Command Like Insert New Block?

Jul 19, 2012

Is it possible to write an event handler for an autocad event/ command like insert new block? I want the event to trigger the execution of an update routine . something like this post

[URL]

how do I access the autocad object in autolisp?

View 4 Replies View Related

CorelDRAW X3 :: Add Event Handler In ThisMacroStorage Module?

Nov 15, 2011

I am trying to add event handler in the "ThisMacroStorage" module of CorelDRAW X3. I wrote a procedure to handle the "GlobalMacroStorage_DocumentOpen(ByVal Doc As Document, ByVal FileName As String)" subroutine. However, it does not trigger when I open an existing  document the event does not trigger. When I check the Application.EventEnabled property the value is false. When I set it to true the value remained false.

The handler routine works in X4 and X5 and the Application.EventEnabled are both true in X4 and X5.

why X3 does not trigger? According to the dvba_pg.pdf file the events including "GlobalMacroStorage_DocumentOpen(ByVal Doc As Document, ByVal FileName As String)" will trigger in this case when a file is opened.

Is there something I need to do so that Application.Enabled will true? I did a X3 repair. I reinstalled the Utilities which includes VBA. I reinstalled the 3 updates.

View 1 Replies View Related

Corel Website Creator X5 :: How To Create 404 Error Handler Page

Jan 15, 2012

I created my site with Website Creator X5, using a predefined style. Now I want to add a single page (e.g. 404.html). This page should have the same design and graphics, but it should not appear in any menu bar or site structure.

View 2 Replies View Related

Corel Website Creator X6 :: Create Download File Handler To Manage File Downloads?

Jul 17, 2013

1) how do i create a download file handler to manage file downloads in a website? to be precise, lets say for instance i need to place file samples for my audience to download, how do i go about it?

2) how do i place a file upload handler in a website?

View 2 Replies View Related

AutoCAD .NET :: UCS Of Database

Aug 20, 2011

Is it possible to take Current User Coordinate System of external Database object, like

Application.DocumentManager.MdiActiveDocument.Editor.CurrentUserCoordinateSystem?

View 7 Replies View Related

AutoCAD .NET :: ObjectOverrule For PnId Database

May 31, 2013

 Any equivalent ObjectOverrule for the PnId Database?

If an entity is copied I dont want certain field values to be copied.I've tried an ObjectOverrule but I can't get the RowId at that point.

I also noticed that the field values are set as XData. I edited the XData in my ObjectOverrule but the values still gets copied.Is there a setting at project level to control which fields not to copy?

View 1 Replies View Related

AutoCAD Map 3D :: Convert DWG With Database Links?

Jun 8, 2012

I am trying to convert several drawings that are linked to an SQL database to SQL spatial. The drawings are from a Autodesk map 2004 system. I have Map D 2013 64Bit installed on a laptop along with SQL server 2012 RC0 (Microsoft SQL Server Management Studio 11.0.1750.32 Microsoft Data Access Components (MDAC)  6.1.7601.17514 Microsoft MSXML 3.0 4.0 5.0 6.0 Microsoft Internet Explorer 9.0.8112.16421 Microsoft .NET Framework 4.0.30319.269 Operating System 6.1.7601).

To keep my rouge laptop off the company network I exported our existing SQL data to a access database that I placed on the laptop and converted back to SQL and linked it to the 2004 drawings. That part worked fine. I would like to convert all of them to SQL spatial. I have converted a small drawing but it took a couple of hours. I am in the process of a larger drawing that has 60,000 entities and it has been working for 8 hours and only has 4550 of them completed. I am using the output to fdo connection.

View 8 Replies View Related

AutoCAD .NET :: Finding A Sphere In Database

Mar 27, 2013

As part of the automation requirements we are working on (through the .NET interface), we would like to find out whether a given drawing contains a sphere and if it does we would like to know its properties. We are doing something like this, to loop through the database and am able to get all Solid3d type of objects.

What I would like to know, if a given solid3d object is a sphere or otherwise. The code snippet is pasted here for reference:

bool bContainsSphere = false;            
foreach (ObjectId Id in Ids)
{
  DBObject oObject = ts.GetObject(Id, OpenMode.ForRead);                  
  if (oObject.GetType().Name == "Solid3d")
 
[Code] ......

View 8 Replies View Related

AutoCAD .NET :: Block Information Database?

Jun 27, 2011

I want to create an application that intensively uses dynamic blocks, cross checking any new or changed block entity with existing ones.

It needs to be almost instantaneous but the only way I know will be impractical.

Looping through the property collection of each block reference, searching for each parameter then checking for a match.

Is there some sort of database functionality I can use to quickly compare block information?

View 1 Replies View Related

AutoCAD .NET :: Zoom Extents On New Database?

Sep 17, 2007

I have created a new database: Database newDb = new Database(true, true) Inserted a block into modelspace and now I want to zoom extent before saving.

Can this be done working on a new database in memory? all the examples I have seen on this board use Interop on a open document.

View 9 Replies View Related

AutoCAD .NET :: Linking Dwg To External Database

May 10, 2012

How can I link an external database(say access/oracle) to a drawing so that I m able to insert/update attribute directly from the autocad map drawing.

View 1 Replies View Related

AutoCAD .NET :: Browse All Objects Into Database?

Sep 3, 2012

How i can browse all objects into an autocad database?

View 5 Replies View Related

AutoCAD .NET :: Temporary Document And Database

Oct 18, 2012

I have a preview control on a window that I want to display temporary custom entities that the user can build before adding to the current working document. Is there a way to create a temporary document and database that I can show in my preview control? The Preview Control was created with the guidance of the BlockView.net sample.

What I mean by temporary, is a document / database that cannot be displayed or edited in the editor window.

View 2 Replies View Related

AutoCAD .NET :: Accessing Database Tables

Sep 21, 2011

I'm having a problem accessing data manager tables in the 2011 version.  My C# .NET code worked fine with 2010.  Here is a sample of the 2010 code that works, but returns zero length tables in 2011.

C#

ProjectPartCollection oPP = PlantApplication.CurrentProject.ProjectParts;
PlantProject oPProj = PlantApplication.CurrentProject;
Project oProj = oPP["PnId"];
try
{
//get ACAD data table
[code].......               

The last two lines fail to object any meaningful data in 2011.  In 2010, I would have all the table rows and could access tags and asset information. 

View 2 Replies View Related

AutoCAD .NET :: Difference Between Database Definitions

Apr 22, 2013

what's the different between

Dim oDb As Database = HostApplicationServices.WorkingDatabase
 and
Dim oDb As Database = Application.DocumentManager.MdiActiveDocument.Database

View 3 Replies View Related

AutoCAD .NET :: Copy Linetype From Another Database

Aug 17, 2006

I have 1 drawing open, I have another drawings Database open . I have found the LinetypeTableRecord (in the Database) of the line type I want to copy to the open drawing.

How do I copy a LinetypeTableRecord from one drawing to another?

View 8 Replies View Related

AutoCAD .NET :: Create New Material - Add To Database

Jun 17, 2011

I'm having a complete blockout on my attempts to create a new material with VB.NET.

Dim db As Database = Application.DocumentManager.MdiActiveDocument.DatabaseDim tm As DBTransMan = db.TransactionManagerDim myT As Transaction' myT = tm.StartTransaction()Dim tt As Autodesk.AutoCAD.DatabaseServices.Material = New Autodesk.AutoCAD.DatabaseServices.Materialtt.Name = "Mat_new"tt.Description = "New Material"myT.AddNewlyCreatedDBObject(tt, True)myT.Commit()

It was noted that this code didn't work (which I can confirm):

"Just a guess, but you probably have to add it to the Database in order to use it."

I can't find any way to add this to the database. I'm working with the R2010 drawing format it that is relevant.

View 6 Replies View Related

AutoCAD Map 3D :: Database And Drawing Edits At Same Time

Mar 12, 2012

Can you have a database and the dwg file open at the same time and not be in read-only mode?

For example: I have access database file open and editing it while in the dwg file with the graphical info that is linked to the database.

View 8 Replies View Related

AutoCAD Civil 3D :: Survey Database Coordinates Off

Feb 23, 2012

i have a point file specifically a PNEZD file. when i import points into the survey database the coordinate in the database is correct but the coordinate on the drawing tends to be 5 feet off one way and 1 foot off the other. When I import point through the points pull-down menu the coordinates are correctly shown. When I import point into survey database from drawing the coordinate is incorrect in the database but correct on screen.

View 3 Replies View Related

AutoCAD .NET :: Application Which Uses Oracle Database As Backend

Jun 22, 2012

I am working on an application which uses an oracle database as backend. The application uses a login dialog in void IExtensionApplication.Initialize()

so my application knows the credentials for the oracle database. I use a drawing-template which has a database link in it. This points to a UDL-file  in 'Data Links'. If i add the Credentials to this file and set the Parameter Persist Security Info=True the Credentials are ignored. So i thought i can avoid the additional loginprocesses if I add the following

var acadApp = (Autodesk.AutoCAD.Interop.AcadApplication)Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication;dynamic cao Connect = acadApp.GetInterfaceObject("CAO.DBConnect.16");cao Connect.Connect("myconnection.UDL", "username", "password", false);
 
If i don't execute the code above i need two logins for the new drawing. After I added the code to my application I still need one oft this.

View 1 Replies View Related

AutoCAD .NET :: Updating Drawing / Database After Modifying It

Jun 30, 2012

I have written a command that replaces the given annotative scale of all objects in a drawing, with another annotative scale. Works great, except I can't remove the replaced annotative scale (with SCALELISTEDIT - DELETE button), unless I save the drawing and then open it again.

An annotative scale that is in use, can't be deleted. But since I can delete it after reopening the drawing, I am sure it is not in use anymore.

Is there a way to "refresh" the drawing/database, without reopening it?

View 5 Replies View Related

AutoCAD Map 3D :: New Database And Shape Files Creation

Sep 26, 2013

I have started a new project and would like to use the database table from a previous project with this one. Basically what I want to do is create a new shape file using the a previous database table so I do not have to create a whole new data base.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved