AutoCAD Inventor :: Extracting Text From Notepad File?
Jan 3, 2012
I'm in the process of creating an external iLogic rule and would like to extract part of the contents of .notepad text file to use in my rule as a string. Is this possible?
I have a requirement to extract metadata from AutoCAD files with a script. This metadata is the attributes that appear in the files Title Block in the corner. I have come up with some code that I believe can do this, but I cannot run it, since I've been developing in Visual Studio using .NET, and it appears that that .NET API can only be used to build plugins for AutoCAD.
Do I have to use VBA to access the COM? How do I even get started with VBA/COM API? It took me forever to actually find a listing for the .NET Object Model - I don't want to search for that long again to find the COM API, especially if I'm going about this in the wrong way again.
Here is the code I've written to extract the Attributes, but it's probably very wrong as well, since I have not had the opportunity to test it:
class Program { static void Main(string[] args) { try { using (Database db = new Database()) {
I have Autocad 2007 and already have created a few custom linetypes by creating a new .line file that i edited with notepad.
My question is can i create a custom linetype intuitively by drawing myself the linetype on my autocad screen and then entering it somehow in Autocad without having to bother with linetype code.
I have been asked to write utility that will open a DWG file, retrieve layer data from the file and put it into a spreadsheet.
I know nothing about AutoCAD but I have been reading on this forum and gathering information. I have found that I have to write a dll that will be used inside of AutoCAD. Here is what I have so far:
1. I have AutoCAD 2008 (will convert to 2011 or 2012 later)
2. I have .NET Framework 4.0
3. I have Visual Studio 2010 Express
4. Needs to be done using VB.NET.
I need to do this using .NET.
Do I need the 2008 API?
Could this be done easier using VBA?
Once I create the dll how do I use it inside AutoCAD?
How do I grab the layer data for studs and braces?
I am trying to import a Shape file and extract the attribute data associated with the 'lines' (sewer pipes) into text format.
for example a pipe has an attribute showing the pipe diameter and intead of having to manually type it out I would like a way to extract that information.
Is there a way to do it? Whether using a specific method during the importing of the Shape file or another process?
i have lidar contour file that is a shape file, when i import this file using map with data connect i is imported with the correct elevation but is not useable for presentation only, when i import it with the map import command it does not retain the elevation on the polyline that it imports.
We have a custom LISP program (Written, upadated in 2003) that takes a keyed in item number, opens and searches a .txt file with four coulmns, for the keyed in item number (column 1) and returns a part number (column 2), description (column 3) and any information in column 4.
A quetsion was asked if the data in the .txt file could be put in an Excel file. I tried looking at other post, but I can't seem to find a clear cut way to open and extract the data. Or this old dog overlooked a boand. Is there a easy way to do this, similar to the above?
I want to extract 2D drawing view of the attached model. I tried but could not succeed because most of the sketches are on the angled user defined work planes.
See the following links, I did the same for some of my other models:-
[URL] ...
[URL ...
How can I show the modelling process of this model with 2D drawings?
I would like to create an component inspection sheet as a second sheet on an Inventor IDW file. This is a sheet that lists all the dimensions on an engineering drawing.
Is there any way I can automatically extract / list dimensions from the enginnering drawing sheet and display them on the inspection sheet.
Given a sketch, I wish to get its profile paths (outer, plus inners), for each path, I wish to get their individual curves (line, arc, splines, any type). For lines, I need start and end points, for others, some sample points would do.
For "T" like thin profile shape, following code got me, 1 Profile Path, which had 8 Lines (thus 8 points) and it worked fine.
For Each path As Inventor.ProfilePath In extFeature.Profile
If Not path Is Nothing And path.Count > 0 Then For Each entity As Inventor.ProfileEntity In path If entity.CurveType = Curve2dTypeEnum.kLineSegmentCurve2d Then Dim oSkE As SketchEntity = entity.SketchEntity Dim oLine As SketchLine = CType(oSkE, SketchLine) Dim startpt As Inventor.Point2d = oLine.StartSketchPoint.Geometry Dim endpt As Inventor.Point2d = oLine.EndSketchPoint.Geometry
But same logic does not work (crashes at Casting I guess) for "S" shape as below:
how to extract the attribute value of a particular block in multiple drawings to an excel file.
Eg... there are nearly 800 drawings where I need to list down the description and Drawing number which is mentioned in the title block name "Title". The Drawing Number and the description is done in same attribute block. extract the data into an excel file or txt file. All the drawings are saved in one location.
I have some coordinate in the excel file. How to import from excel to dwg. All coordinate i will make polyline. I know one method all coordinate copy and paste to command prompt. But i need script file or other method.
I want to ultimately place some metadata such as lens focal length, time of day, exposure etc. onto an image. This could be an action that perform on each image. But it would be nice if it was automatic.
The result being to have a jpg file with this information in the corner of the image for myself and my client's reference. I can't seem to find either a plugin, action or script that will do this for me. These are simply proof / scouting shots. I would be just as happy doing this in Lightroom as well.
The company logo is two words. It's in Irish and has a fada on top of one letter.(hence it is harder to find a nice font)
I'm trying to take the logo from the pdf it's in, and apply it to a poster i have designed. I'd like to be able to change the size of the lettering and color etc once it's in the new image. I've tried the "path tool", and also cropping it and copy/paste to the new image, but the background color that comes with it looks awful!
I have many I-parts that have many members. All these members differ in size, sheet metal style and material.
That's a nice case for an I-part right? We can manage the members in a table, and we can create flat patterns & drawings that go with these members, so when we get an order for a machine, we don't have to touch any of these components.
The things is, that I want to show the length & width of the flat pattern, the sheet metal style, and the K-factor of the I-parts members in the parts lists of the assemblies they sit in.
I have 4 custom properties for this. Flat_Pattern_Length; Flat_Pattern_Width; Sheet_Metal_Style; Sheet_Metal_k_Factor
These properties show up on the parts lists. I use Inventor 2012 (with Solidworks Enterprise PDM)
I have tried to make a rule in the factory that fills these properties. I fire the rule on "save document". My train of thought: Every time Inventor saves a member, it applies the factory rule, and fills the member properties.
Results are extremely unstable. I have seen all members generated with correct properties, I have also seen that literally nothing happens on the members. There are some brute force workarounds (edit member scope, run rule) but this is not a sustainable solution.
I cannot imagine it would be so hard to get the sheet metal information available as properties for these files! The use of I-parts is a fixed constraint, and the use of those property names is an almost fixed constraint.
I am having difficulty converting a STP file (made in SW) to a Parasolid Text file for a customer. I was going to post the model to Customer Files, but for some reason I cannot post on there? The file size is roughly 21MB
I've downloaded a brush, that I'd like to use in Photoshop 10, and I read that you're supposed to extract the file into
Program Files > Adobe > Photoshop (whatever version you are using) > Presets > Brushes
Now, this is how far I can get:
Program Files > Adobe CS3 > Photoshop > Adobe CS3
I don't have anything called "Presets", but I have payloads, redist and resources. I can't find anything similar to "brushes" either, am I in the right place?
I have seen mention of a utility called xcf2png which can extract layers from a XCF file and write them to a PNG, but it seems there is no Windows version.
Any way of doing this under Windows/DOS? I just want to extract a layer by name and write it to a PNG file with the same name as the layer.
Or even better - searches a XCF file for layers that (say) start with an underscore and exports only those layers to separate named PNG files.
Importing keyword hierarchy from notepad txt document not working as in Lightroom 3...
In Lightroom 3 when write hierarchy in notepad everything in {...} does not display in Lightroom Keyword list but is automatically exported as keyword tag. This is not the case in Lightroom 4.
On below test hierarchy which i have included as a screen cut
When you tick on Giant Golden Mole in Lightroom 3 for instance, the latin name (Chrysospalax trevelyani) as well as the order (Afrosoricida) and family (Chrysochloridae) is automatically tagged. Only the latin name appears though in Lightroom 4 !!
I am brand new to Inventor and I am being given the seemingly simple task of finding the tooling files that needs to be checked for correction on account of parts manufactured out of tolerance. The plotted drawings I'm given has text on in that can find the files, but the drawings are huge. Is there a way to find text like I've been doing when given the similar task in Autocad? I see no edit menu in Inventor.
I am trying to enter some material ordering info into an external spreadsheet, and have that info reflected in a text box within an idw drawing file.
My method is as follows:
Obtain a numerical value (250) from an external Excel spreadsheet (sample.xlsx).Assign this value to a parameter (abc) in an idw file (Materials Ordering.idw).Insert parameter abc I made into a text box within the same idw file.
I made a set_parameters rule, and the ilogic text of the above example is as follows:
'Open File and Scan line - Part = Impeller Casing Flange i = GoExcel.FindRow("sample.xlsx", "Sheet1", "Part", "<=", "Impeller Casing Flange") 'abc = Material Width abc = GoExcel.CurrentRowValue("Material Width")
I had no problems with the first two steps, after checking the parameters I could see that parameter abc is being updated successfully.
However, I am having trouble with the third step. In the format text dialog box, I can see a drop box for components, but I can't find a reference to the idw file in there.
My question is, am I going the wrong way about this? Should I have assigned the parameters to a component instead of the idw file?