I have a dictionary in the NOD with several xrecords. I want to change an entry value in one but the others in the dictionary also get changed. How would they be connected?
This is some simplified code that looks at two xrecords, changes one, then reports the new values. Weird thing is that both xrecords get changed.
For i = 1 To 2 XRecId = MyAppDict.GetAt(i) XRec = trans.GetObject(XRecId, OpenMode.ForRead) ed.WriteMessage(vbLf + "XRecord: " & i & " First Entry: " & XRec.Data(0).value) Next XRecId = MyAppDict.GetAt(2) XRec = trans.GetObject(XRecId, OpenMode.ForWrite) Dim data As ResultBuffer = New ResultBuffer(New TypedValue(DxfCode.Int16, 2), New TypedValue(DxfCode.Text, XRec.Data(1).value)) XRec.Data = data For i = 1 To 2 XRecId = MyAppDict.GetAt(i) XRec = trans.GetObject(XRecId, OpenMode.ForRead) ed.WriteMessage(vbLf + "XRecord: " & i & " First Entry: " & XRec.Data(0).value) Next
I have polyline that graphically represents a pipe. Obviously, the polyline can not contain data for a pipe: size, material, insulationtype, insulationthickness, schedule, etc. So, I have created a custom object with all of the appropriate properties, methods, events, etc that I need for it to behave as a pipe. My custom object has a reference to the actual polyline with a Handle property stored as a long(since AutoCAD objects can not be serialized). I referenced an AU 2008 class by Jeffery Geer (A Pattern for Storing Structured Data in AutoCAD Entities CP401-2) to get me as far as I am.
My object is marked serializable. I serialize it to binary and attach the binary in 127 byte chunks to the xRecord of the polyline object.However, as soon as I attach this binary xrecord, I get the following message when I try to save the drawing:
"One or more objects in this drawing cannot be saved to the specified format. The operation was not completed and no file was created”
I am trying to design a key chain, and I would like to write a 3D text on an arc. Is there a solution to that chalenge, other than drawing every letter with a polyline and then press pulling it?
i have a Problem with my Autodesk CAD 2012 version. I wanted to write a VBA-Skript, but then there comes up a problem i cant solve and i don't know if it's a CAD or a VBA problem. When i make a Userform with a Textbox and run the program i can't write anything into the Textbox. I have the impression the program jumps always from cad to vba and back.I tried it then in excel and in the Microsoft Visual Basic 2010 and there it was no problem.
I have a structure that I need to wblock but I need to bpoly it first, which is a tedious and time consuming process.Is there a way to wblock it without applying bpoly first?
I am trying to write a macro for a button that when I press, it goes to a certain folder on a server. Normally when you click on the "open" button, it takes you to the last file location. I want that to be ignored an goes to a certain folder.
I been able to use the ProgressMeter to write message to the StatusBar of the AutoCAD window. Is there a way to just write text (without a progressmeter)?
I have a drawing which consists of lines and blocks. I need to write down the (x,y) coordinates of each point of my interest. I expect results to be copy-paste'able, text or plain text preferred.
How should I do that? I guess there is a build-in command for this, I fail to Google it though.
I am a new user of civil 3D 2012. How to write a new coordinate category in my computer.
I am using a 64 bit windows 7 and everytime I attempt to write a new coordinate system category it always display the words " no access to write to the dictionary".
I'm trying to write a program in C# to automate ballooning from a BOM.The routine must read the BOM and for every row it highlights in all the views the corresponding component.Then the user must be able to manually draw a balloon or balloons to the highlighted items.
When done the next row of the BOM is called, etc.I can choose to start with a BOM from our PDM system or the Inventor BOM, partlist or drawingBOM
I tried different ways but I get stuck on it.I even tried to select the nodes in the browser and called oNode.doselect, but then I can't get the proper type for the selected items to go further?
I recently found this lisp routine which changes dimension text from the actual measurement to EQ.
(Defun c:equaldim () (setq newdim (entsel " Select Dimension to Replace with EQ.:")) (setq newdimvalue "EQ.") (command "dimedit" "n" newdimvalue newdim "") (princ) )
I would like to be able to do the same in 2013 LT using a macro. All efforts to write a macro have failed because I don't know what controls the Text Override.
When I try to create a custom ribbon cable I get a message that reads:
"The cable and harness library is being edited by another user or is marked as read only. The Cable and Harness Library will be opened in read-only mode. No changes can be made to the cable and harness library, but wires and cables can still be inserted into the harness assembly."
In my project file I made "use style library" to = Read-Write
System Specs:
Windows 7 Pro Autodesk Product Design Suite Ultimate 2014 Autodesk Vault Basic 2014
I'm upgrading some older COM based code to work in VB.Net with Civil 3D 2012. The app iterates through all of the Alignment objects, finding the ones with SuperEleveation, and places the names in a listbox. The user can select one or more of the alignments from the list to have the SuperElevation slope values modified.
The problem I am having is when I get the alignment object to update I get an execption that the object is locked. It's probably something simple but I'm at a loss to where to go next.Here as a brief code snippet:
' Sub1 is called to find all of the alignment objects with SuperElevation Sub Sub1() Dim objCol As Autodesk.AutoCAD.DatabaseServices.ObjectIdCollection Dim objID As Autodesk.AutoCAD.DatabaseServices.ObjectId Dim tm As Autodesk.AutoCAD.DatabaseServices.Transaction Dim myAlg as Alignment [code]....
I am getting some unknow error in autccad and error details are as below
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at System.Windows.RoutedEventArgs.set_Source(Object value)
I open a document from a file (with read-only mode set to false). Then I lock this document and start a transaction.
Within this transaction I delete all blocks that are named "MyBlockName", but none of them are deleted.
I also attempted editting attributes within a block, and the attribute textstring does not change one bit!
Anyways, after the transaction is committed, the database is saved, the lock is disposed, and the document is saved:
public void DoChanges(DrawingFile drawing) { //DrawingFile.FullName is a valid string of a full file name. AcAp.Document acadDoc = AcAp.Application.DocumentManager.Open(drawing.FullName, false); using (AcAp.DocumentLock docLock = acadDoc.LockDocument()) //Lock for modifying. {
[Code]...
So, what steps must I do in order to open a document from a file name, make changes to it, then save it?
The only thing that seems to not work here is making changes to it.