AutoCAD .NET :: Create New Entity Into Xref Of Opened Document

Oct 9, 2013

I have opened a document with several xref and i want to add new entityes into those xref. How can i do?

We launch _refedit/_refclose commands in AutoCad Command line for this. I want to do the same in Autocad.NET

View 2 Replies


ADVERTISEMENT

AutoCAD .NET :: Adding Entity On New Drawing (document) With New Layer

Nov 29, 2012

I am trying to add an entity on a new drawing (document) with a new layer.

Following is the code snippet I have right now.
 
[CommandMethod("TEST")] public void Test() { Document newDoc = Application.DocumentManager.Add("acad"); Database db = newDoc.Database; DocumentLock docLock = newDoc.LockDocument(); try { using (Transaction tr = db.TransactionManager.StartTransaction()) { BlockTable bt = tr.GetObject(db.BlockTableId, OpenMode.ForRead) as [code]..........

PTPUtils.CreateLayer() method creates a new layer in the given DB. However, the code gives me an "eKeyNotFound" exception in the line p.Layer = newLayer.

If I remove the p.Layer line, the code works very well. But the entity only goes to the default layer "0".

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Color And Linetype Of Xref Nested Entity

Aug 22, 2012

I have a Lisp that I have been working on with some folks in the office, and i feel like i am close, but i am not getting the cigar. The idea would be to have the lisp allow the user to select a nested x-ref entity, and change the color and linetype of the selected layer, similar to the old "LAP" command (I know it is a dinosaur, but I still miss it). I seem to be doing swimmingly, code I have quasi-plagiarized. It seems to crap out where i try to pass the selected linetype back to the layer. I get the nastygram "Command: ; error: no function definition: GETLINETYPE" right after selecting the linetype from the dialog.

Code below...

x(defun c:CX (/ Sel EntList DataList cnt Num ClrNum EntData)
(if (setq Sel (nentsel "
Select object to change layers color and linetype: "))
(progn

[Code]...

HP Elitebook Workstation
Windows 7

View 6 Replies View Related

AutoCAD .NET :: Closing Default Opened Document After Net Loading DLL

May 31, 2013

Context : AutoCAD Map 3D 2013Visual Studio 2010.NET 4.0, C#, WPFFDOOracle DataStore

Requirement : When I start AutoCAD Map 2013, a default document called "Drawing1.dwg" is opened. I use the command NETLOAD to load my assemblies. Final Users don't NETLOAD, an entry in the registry does the job automatically. During Initialization, my application downloads from the database a Template DWT file to initiate automatically the connection to the DataSource, and shows the different layers and styles configured by the customer. A new drawing based on this DWT is then generated.

However, the first default document remains opened. It can be sometimes annoying for the user to have both documents opened. I've never found a nice solution to close this first default document.

My technical implementation, not working :

In the Initialize method coming from IExtensionApplication, I start my application (loading business classes, user interfaces, etc...). Once started, I download the DWT, and add a new Document to the DocumentCollection (Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager). To this new Document, I handle many events such as CommandWillStart, CommandEnded, CommandFailed, etc... At this time, my Application asks to the user to log in. And finally, I browse the whole DocumentCollection to try to close all documents that are not the new one based on the DWT.

DocumentCollection doc_coll = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager; _kleverageDocument = doc_coll.Add(dwtFilePath);
if (_kleverageDocument != null) {
_kleverageDocument.ImpliedSelectionChanged += new EventHandler(doc_ImpliedSelectionChanged); _kleverageDocument.CommandWillStart += new CommandEventHandler(doc_CommandWillStart);

[Code] ....

When I call the CloseAndDiscard method for each of the other Documents, I always get an Exception telling me that the document is currently drawing. Actually, the command "NETLOAD" is stil running. How can I do ? I tried another way, by using handled events on DocumentManager

Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.DocumentActivationChanged += DocumentManager_DocumentActivationChanged; Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.DocumentBecameCurrent += DocumentManager_DocumentBecameCurrent;

View 2 Replies View Related

AutoCAD .NET :: Switch Mdiactivedocument Over To Newly Opened Document?

Feb 19, 2013

I am importing a dgn into autocad by using the SendStringToExecute method with the 'Import' command.  My problem is that once I have the dgn imported I want to do some modification and then save the drawing, but setting a new dim to the current mdiactivedocument still gives me the initial document and not the one opened by the import command as I had thought it would.

How can I switch the mdiactivedocument over to the newly opened document?

View 1 Replies View Related

CorelDRAW X6 :: SVG Document Isn't To Scale When Opened?

Jul 7, 2013

using CorelDRAW X6. I am having trouble when opening SVG documents in CorelDRAW X6. They seem to always be 33.333% smaller than the size I saved them in Adobe Illustrator. 

I am more familiar with AI and use it for most of my design work. I use CorelDRAW mainly to save files as HPGL plotter files to cut designs with a CMC machine (there is no way to my knowledge to save HPGL files with AI). 

When I open an AI file in CorelDRAW it is always to scale. However when I save it as an SVG file and open it with CorelDRAW it is always exactly 33.333% smaller than the size I saved it as in AI. While I can open AI files in CorelDRAW for my purposes it is easier if I save as SVG. I just want it to be the same scale when I open it in CorelDRAW but it is always smaller (by exactly 33.333%)

Not that it is that big of an issue, I can always scale it to the proper size. I would just like to understand why it works this way and if there is a way to correct it.

View 4 Replies View Related

AutoCAD .NET :: If Selected Entity Xdata Contains Value Then Select Additional Entity

May 22, 2013

I would like to add additional entities to the selection if any of the selected entities contains a an xdata value.

If I put the condition into the ImpliedSelectionChanged reactor I imagine will probably loop back on itself.

View 9 Replies View Related

AutoCAD LT :: Updating Proxy Entity - Can Proxy Entity Attributes Be Changed

Feb 27, 2012

want to upated attributes in proxy entity is this possible?

View 1 Replies View Related

AutoCAD 2013 :: How To Create Layer On Xref

Mar 7, 2013

How can I create a layer on my xref so it doesn't affect othere sheets referencing my drawing without having to open a couple of hundred draiwngs. I know I can create my layer, freeze it, save my drawing, open all sheets referencing my xref and save them. Better yet, is there a setting I can use that makes my new layer pop up frozen on for all sheets while I work on my xref, on a newly created layer?

View 4 Replies View Related

AutoCad :: What Is Command To Create XRef From Drawing

Feb 1, 2013

What is the command to create an X-Ref from my drawing?

View 9 Replies View Related

AutoCAD .NET :: How To Create A Block With A Att For Display Path Of Xref

Jul 17, 2012

i looking a way for create a block after selected a Xref.

It is for display the path+Name of my Xref.

It use fields manualy put i can copy/paste the bloc. (ObjectId not egual in a 2 dwg).

I want :

1 - selec the Xref --> I know how to do that.

2 - create a bloc --> I know.

3 - create a att -> i know

4 - fill the att with the field --> ???

View 1 Replies View Related

AutoCad :: Create Templates With Xref For Title Block

Mar 3, 2011

i am trying to set up templates at a new job and i want to create templates with an xref for the title block so when we start a new drawing, we use the template, save to the project file and everything is there with our title block already xref'd. my problem is, the path on the xref'd title block stays the same and is still referencing the location of the file i used when creating the template. if possible, when i save the new drawing to the project foldeer i want the xref to also move to the project file and the path to the xref to change.

View 4 Replies View Related

AutoCAD .NET :: How To Create Collection Of Xref Objects Into New Drawing File

Oct 12, 2012

idsObjEntity-->collection of xref objects
private void CloneObjectIds(ObjectIdCollection idsObjEntity, String strFileName)
{
try
{
Database dbNew = new Database(true, false);
Autodesk.AutoCAD.DatabaseServices.TransactionManager tm = dbNew.TransactionManager;
[code].........                 

here i take the object id collection as xref filter by its layer name.i tried to clone the object in new dwg its shows Wrong database.

View 1 Replies View Related

AutoCAD Inventor :: Create New FeatureBasedPattern Within Assembly Document

Dec 6, 2013

if there is any way to create a new 'FeatureBasedPattern' within an assembly document. I have 2 assembly occurences - parts. In the Part1 i created a RectangularPattern of workpoints. The Part2 is going to be used in the new pattern. I tried the following VBA code, but it doesn't work.

Dim oPart1 As ComponentOccurrence
Set oPart1 = oAssDef.Occurences.Item(1)
Dim oPart2 As ComponentOccurrence
Set oPart2 = oAssDef.Occurences.Item(2)
Dim oTG As TransientObjects
Set oTG = ThisApplication.TransientObjects
[code]...

The Call function breaks with: "Invalide procedure call or argument". I also tried "Set oAssemblyPattern = oAssDef.OccurencePatterns.etc...." instead of Call function, but with the same result. Same error for declaration change of "oAssemblyPattern" to "FeatureBasedOccurrencePatternProxy".

View 1 Replies View Related

Lightroom :: Catalog Cannot Be Opened Because Another Application Already Has It Opened

Jun 9, 2012

I am trying to open Lightroom 4 from my desktop and it keeps giving me this message:The Lightroom catalog named "Lightroom 4 Catalog" cannot be opened because another application already has it opened.

View 1 Replies View Related

AutoCAD Inventor :: Create Exploded View In Presentation Document Via API

Nov 7, 2012

Is it possible to add an exploded view to a presentation file via the api?  I can access existing exploded views, but did not see an add method.

View 2 Replies View Related

AutoCAD Inventor :: How To Create A Line With Part Document Setting

Jul 13, 2012

My part unit length has been setup as millimeter(mm).Once I created a line within 2d sketch by VBA script, the result of length always become to 10 times of value.For example, the two points of line is (0,0) and (0,4). But the result of length measured is 40.

My problem is how to create a line with part document setting?

View 1 Replies View Related

AutoCAD Inventor :: Create Workplane From A Face In Assembly Document

Jul 15, 2011

In an assembly document, I try to add a MateConstraint between male and female side of an 45 degrees elbow. The male side is built on the XZ Plane and Y Axis And I try to create a workplane on the female face.

But a got an error with the last line of code.  Here's my code (vb.net code) :

' Get application object
Dim app As Inventor.Application = GetObject(, "Inventor.Application")       
Dim doc As Inventor.AssemblyDocument = app.ActiveDocument           

[Code] .......

View 3 Replies View Related

AutoCAD Inventor :: Create New Base View In Drawing Document

Jul 13, 2009

I am trying to create a new base view in drawing-document.

I can get hold of the view but cant find a way to set reference data --- would like to set the "Line Style" to "As Parts" and "Hidden Line Calculation" to "All Bodies".

View 5 Replies View Related

AutoCad :: Create New Document With New Layers But Paste In Existing Floor Plan

Apr 24, 2013

I am trying to create a new document with new layers, but paste in an existing floor plan since it's the shell I need to be using. When I copy clip and insert into new file, all the layers import with it. I transferred everything onto 0 layers and went into my layer manager to try and delete the extra layers and it says i cannot delete o, xref dependent, etc. I want to create my own layers, and then assign the lines in the plan myself onto the new layers.

View 4 Replies View Related

AutoCAD Inventor :: Create Dimension On Drawing Document Between Two Parts In Assembly

Feb 8, 2010

From a VB.Net program, I'm trying to create a dimension on a drawing document between two parts in an assembly. I can get the parts using component occurrence. The line marked below throws the following error: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)).

As you may see, I have allocated memory for both "Edge" and "Face" (Dim oEdge1 As Face) albeit one is commented out. Attached is the screen shots from the attribute helper add-in. In it, you will notice that the attributes are of type: "Face".

Public Sub CreateDrawingDimension(ByVal Part1 As String, ByVal Part2 As String, ByVal AttName1 As String, ByVal AttName2 As String)
' Get the Active Drawing document
Dim oDrawDoc As Inventor.DrawingDocument
oDrawDoc = invApp.ActiveDocument
[code]........

View 2 Replies View Related

AutoCad :: Use Xref Manager To See Where Actual File For Xref Resides On Computer / Server

Nov 15, 2013

I know that in ACAD you can use the xref manager to see where the actual file for the xref resides on your computer/server/etc. What I'm curious about is whether or not the inverse action is possible. Can you somehow access the file (not the output sheet where it's being xref-ed) and see what other files are using it as an xref?

I've come in on a project that is nearing completion and have been assigned the task of "cleaning up the project folder." Unfortunately, there are a ton of files in the different folders that are no longer in use on the final output sheets and I need to keep the ones still in use and archive the ones that are no longer needed. What I've been doing is going through those sheets and reviewing the xref manager for each sheet to see which files are actually put onto those sheets and making a physical checklist from which to organize my findings. Once the checklist is made, I then archive all the files that are no longer being used.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Xref Layer With Xref Name?

Jul 31, 2009

Is it possible to run a lisp which can extract all the xref names, make a layer with that name and then change the xref on the layer? I have got a similar routine from earlier posts but it doesn't work if any xrefs inserted in paper space (works fine on model space). could change this routine allowing to change the layer of xref in paper space too.

(defun dxf (i a) (cdr (assoc i a)))
(defun c:lxr ( )
(setq ss (ssget "x" '((0 . "INSERT"))))

[Code].....

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Xref Reactor Object ID To Xref Name

Oct 2, 2012

I am using (trying to anyway) a :VLR-xrefSubcommandReloadItem reactor.  My only question is how to get the xref/block name from the 'reactor callback data' Object ID.

I am ultimately trying to pass it to (vla-get-xrefdatabase ....), but I cannot figure out how to turn the second parameter from the reactor callback data into something I can use - for example the second parameter returned may be "65" or some other number. 

Civil 3D 2011
Windows 7 x64

View 1 Replies View Related

AutoCad :: Bind Xref But Also Preserve Xref Links?

Sep 17, 2013

when you bind an xref the link disappears from the xref manager.

is it possible to bind an xref, but preserve that link in the xref manager? i realize that will lead to two copies of the same object in the drawing (one xref, plus the new block). everyone's okay with that happening.

View 9 Replies View Related

Photoshop :: Possible To Create Tagged PDF Document

Oct 3, 2013

I am a casual photoshop user. I need to design a tagged pdf documents which is accessible to use with Dynamic PDF. When I searched online, lot of people are using Indesign but I have never used it. So, is it possible to create tagged pdf document from PS or I need to learn Indesign?

View 1 Replies View Related

CorelDRAW X4 :: Create A Document And Publish It As PDF?

Sep 26, 2012

i have a problem with corel draw x4.

So: i create a document and publish it as a pdf. That works.

But when i open the pdf with acrobat the document is empty. Just a white paper.

View 14 Replies View Related

Illustrator :: Possible To Create Hyperlinks Within Document?

Oct 1, 2013

In InDesign it is possible to create links within a 'document', i.e. non-web hyperlinks.

Is it possible do to this in Illustrator?

View 1 Replies View Related

Illustrator :: Can Create Links Within A Document?

May 22, 2013

I'm putting together some design specs and I want to create a clickable table of contents that will navigate to a different section of the document. IE. artboard #27
 
From what I've seen thus far it looks like I can add links but only to websites and they are only clickable in PDF mode.
 
Is it possible at the very least to make my clickable TOC when converting my document to a PDF? and, is it possible to make it clickable even if it is in .ai format?

View 2 Replies View Related

InDesign :: How To Create A PDF Of A 36 Page Document

Feb 16, 2014

I have been trying to create a PDF of a 36 page document. However, when I get to page 6 I get a message 'downloading font' and then the programme hangs and I have to use windows task master to close it down. There are only three fonts being used on the page and according to Font Finder no fonts are missing. This is driving me crazy and I'm fast approaching my printers deadline.

View 4 Replies View Related

AutoCAD .NET :: How To Get Full Xref Path Name Instead Of Xref DWG

Jul 5, 2012

How do I get the full Xref Path name instead of Xref.dwg? I'm scratching my head is this totally under my nose... cause I don't see where the property is stored. I'm getting EV_BDR.dwg instead of C:folderEV_BDR.dwg

View 8 Replies View Related







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