AutoCAD .NET :: Does Not Contain Public Definition For GetEnumerator
Aug 1, 2012
While I tried to start a loop on a selection set object as below,
foreach (AcadObject SelDrawingObject1 in GenSelSSetObj)
I get an error as below,
foreach statement cannot operate on variables of type 'Autodesk.AutoCAD.Interop.Common.AcadObject' because 'Autodesk.AutoCAD.Interop.Common.AcadObject' does not contain a public definition for 'GetEnumerator'
I have several variables I want to be able to set and then use throughout my project.
First, and seems simplest, would be to just Public Shared the variables. Set them as required, call them when needed.
Second would be to create an object and assign the variables as properties to that object. It would take more programming to do this option. The beauty of this would be that I could store the values from drawing session to drawing session and would not have to ask the user for the values every time he starts my program. Can this be a custom dictionary object? Is that how you would design it?
Unless there is a way to make my Public Shared variables hold their values when the drawing is closed. Static doesn't seem to work here, but I could be missing something.
I wanted to public this design to Google Earth, but some how the model is flat wiith existing ground. I did choose "Drape entities on ground" and also tried "elevation relative to ground" it is sitll a flat model.
Our company is looking for training in Autodesk Civil 3d. We contacted a local re-seller, but unfortunately their quote was higher than our company can absorb at this time with the economy. Is there a public list that has certified trainers in different market areas? We are located about 40 minutes North of the Philadelphia area.
I store all my photos in the directories under the public pictures folder, (C:Users Public Pictures) rather than in my pictures folder in my documents. I do this so that all the users on the system can get to the pictures.
I'm having problems getting Paint Shop Pro to recognize the folder correctly. I have added the c:users public pictures folder to the organizer using the Browse More Folders action and it shows up. However, the Smart Collections don't see any of the files in the folders under this dir.
My overall goal here is to be able to use the timeline feature on all my photos at once, so I want to get all of the photos into the All Pictures smart collection.
I'm trying to automate the process of scanning a bunch old public domain magazines. When I try to create an Action to automate the process of the following mouse clicks:
File > Import > WIA Support Click START button on WIA Support screen Choose which device I want to use [flatbed scanner] > Click OK Choose Custom Settings > Click PREVIEW
the Action stops at the very first step above (File > Import > WIA Support).
Maybe Actions aren't the best way to go about automating this entire process. If there is a better way this can be done how do I go about it? I want the macro / Action to stop at the last step above because I often need to adjust the portion of the page that I actually want scanned so I need to do the final step manually (actually scanning the page once I'm satisfied with the preview).
I am creating custom linestyles using the mkltype command.The issue I come across is. A simple line is drawn and the linetype is applied to it.
Line type definition. The length of the line before the first shape is set to a specific value, the length after the first shape is the same value (the shape should sit in the middle of the two values if they are equal), but the position varies when the line is stretched to a length anything other than a multiple of the original length.
why this happens and how to force the first shape to stay in the specific value (length from start of line) position.
I have a question regarding parameters in a block definition, or more specifically how to constrain parameters. I have attached a PDF showing exactly what I am working on. Basically I have an arm for a monitor which I need to add some parameters to. I need to be able to have a point that I can grab where the "primary grab" is located, and when I grab that I need the arm to pivot at the indicated pivot point, but be restrained by the first arm that is constrained to the circle. Is this possible to do in AutoCAD?
Is it possible to examine the linetype definition stored in a drawing. I would like to update linetypes that use an old SHX file with newer definitions but because the name of the linetype can change (RENAME or XREF merging) the only way to reliably do this is to look at the definition (e.g. A,7.25,[LINE5,old.shx],9.25,-5) of a linetype and update it (e.g. A,7.25,[LINE5,new.shx],9.25,-5). Is this possible with .NET or LSP?
I have a .lin file, that keeps giving me several "Bad Definition" dings. I acquired this ".lin" file at a previous job, and am not sure why I can not get it to load correctly now.
I am not the best, at writing computer language, so I know my issue is operator error, and me being the operator; I don't know how to solve it. I changed the ending of the file to ".txt" so it would upload, I couldn't get it too attach in the ".lin" format.
On another note, I'm extremely distracted right now from work, after Yahoo flashed there was a shooting incident at Texas A&M Univ. It makes a person wonder, "What is going on, with all the gun violence lately?"
I'd like to know if it is possible, with the .NET API provided in AutoCAD 2009, to define dynamic blocks (dynamic properties and actions) completely from .NET code (VB.NET or C#).
Is there any way not to show a particular block in block definition table ? My program bring a block into drawing thru a user form . And set some Xdata to it after insertion . If user bring the block manually into drawing then how would we know which one has xdata and which one doesn't. I came to this solution to hide it in block definition list.
how I can get VBA to insert/redefine a block reference from another file into a block (of the same name) that already exists in the target drawing?
I've tried using the insertblock method but it produces a 'filer error' - As a bonus point, it'd would also be good to be able to retrieve the contents of the blocks collection in the source drawing in some clever way other than opening it (a bit like browsing using the design centre) ?
ACad, MEP, 3DS Max Windows 7x64 X5482 @3.2Ghz 8Gb Ram Quadro FX1700
I need to remove lines from a block definition and replace them with LWpolyLines. I see there is a way to Append entities to a BlockTAbleRecord but I don't see a way of removing an entity.
I am programmatically creating several property defintions inside of a property set definition. I would like to be able to set the display order of the property definitions but the property is read only. How to be able to accomplish this using the API?
I am wondering what Block Authoring actions i can use to move my Attribute Definitions up and down in a Dynamic Block. I understand duplication the definitions can get really ugly.
So i want to be able to have a second visibility tab in my block the nwhen i select it my Attribute Definitons insertion point moves to another co-ordinate with in the block.
How to do this so it doesn't ask for a block definition!
I have an extruded region of 50 x 50 (SHS) that I want to put a 45 degree mitre on, so I orientate my UCS to ortho, I have a reference line drawn over the job for my 45 degree/3 points to pick...
I Select 'both' to keep and it asks me for a block definition?
Description or definition of a "Reflective Ceiling Plan" to give to the guys in the shop? Some of them are having a hard time interpreting the drawing and I guess I am not able to communicate it to them properly.
I have a large symbols library and need to have 1 block name and count but be able to show them in different colours depending on where they are placed. (eg pink block at low level and green at high level, but when counted by block name it counts 2 not 1 green 1 pink).
I am having issues with the Batch File changing a attribute definition. I do not want to go in to the 500 or so dwgs just to change the one attribute definition i can code to replace.
; ATTRIBUTE FIND AND REPLACE -ATTEDIT N N TTLBLK DEPT# * CCCC 4682 Zoom Extents QUIT
The code format works for every one of my att in the title block except the DEPT#. I think it is because it is the only att with the # sign as an end character in the Att definition. I can not change the attribute name bc it is my customers title block. I am working on 2013 LT and would prefer a fix for LT but can get access to mechanical 13.
I have had this issue at least 3 times and twice on the same drawing. I create a surface from corridor and add several polylines and feature line as well as a boundary to the surface. Randomly it will lose all definition (breaklines and boundary) and i will have to "select similar" (and hope I get everything) and add all of my definition back.
It seems to only occur on large files and when my frequency is tight on curve and vertical curves.