AutoCAD Inventor :: Macro For Inserting Text And Current Date?
Jan 5, 2012
I'm trying to find a macro that will insert text into a certain spot on my drawing. I want to put it on a button so that when I click the button it inserts "REVISION - 12/5/12", or whatever the current date is, into my title block.
I recently set up Elements 12. Prior to this I used elements 11. In that catalog I have more photos that I don't want. So I decided to export the ones I want then import into PSE 12. As I do this many of the dates on the pictures change from the date taken to the current date. I have tried several different ways and can't stop the dates changing. I am putting them into mobile albums in PSE 12 if that makes a difference.
How to make a current date block? I've also looked for the file location block attribute. I know it exists cuz the architect in this office used to have it. When he quit, he took it out of the pc's.
I have placed a field directly into my paper space ( not in a block ) to show the current date. This is a company requirement so when the drawing is printed, it shows the date of printing. The field just shows the date that the field was inserted and doesnt update. If i replace it, i get todays date but it stays on the date.
I am trying to write a quick macro to open the current drawing in the block editor. I can easily do the steps from the dialog box to open the current drawing, but the command line version give me an error.
Command: -bedit Enter block name or [?]: <current drawing>
(A message box pops up saying, "The name cannot be longer than 255 characters."
If I click ok on the message box, AutoCAD returns to model space. The file name is 30 +/- characters, and the path is maybe another 50 to 100 characters. Can I bedit the current drawing using the command line, or must I use the dialog box?
Can I make VBA macro (application) for inserting blocks? I need to insert blocks from list of blocks that I made. I want to use less time with that application on inserting blocks, then to use standard method Insert>Block... So I want to check the block from my list, to define attributes and to put the block automatically on drawing, and then to repeat all with another and another blocks. all to be put one close to other.
Any good macro for adding the date and the file name to a page? i've had a hunt on the net but haven't found anything that works with X3, even tried Oberonpalce.
For several years I've been programming in Inventor and AutoCAD, with VBA. Making macros and creating a button for them in the toolbar of Inventor is no problem. What disturbs me slightly is that the name of the button is the same as the name of the macro. In VBA you can't create functions with spaces in the name. So the name of the toolbar button often looks quite silly.
Is there a way to change the name and the tooltip-text of the toolbar button without loosing the link to the original macro? In AutoCAD this is no problem, but Inventor...
Product Design Suite 2014 Inventor 2012 SP2, Vault 2014 HP Workstation Z220 Intel Xeon 3.4GHz 16GB RAM Nvidia Quadro 4000 Windows 7 Professional (64bit)
How to make a macro that changes the font for a specific Text Style. The name of the Text Style is eg. "3mm", which I want to change from RomanS to Verdana.
I'm trying to build some export presets with a naming convention to include the current system date, eg: YYYYMMM-Title-Custom Text. This convention is oftened required for photo club, local, national & international photo competitions. The only date function I can find is the 'capture date'. Is there a way to modify the Export Filename Template Editor to include 'current system date' ??
I would like to make a split balloon where the top retrieves the item number and the bottom is a prompted text area. Is this possible?
If the above is not possible my fallback plan would like to make a sketched symbol function in exactly the same way. I believe this option would be significantly more code. If I have to go this route, is there a way to directly mimic getting the item number like the balloon function does?
--My current process involves attaching a user symbol, getting the proper leader node, attached entity, geometry, model geometry, containing occurrence, and then BOM of the component occurrence. Keep in mind this doesn't work for phantom or reference components.
I have taken some photos today but in the file information the date is shown as '2012' but it should be '2014'. Is there a way to ensure the correct current date is entered automatically?
All of a sudden I notice that when I open a file in Autocad Architecture, it shows the file creation date and not the actual last save date. Only thing I can think of is I reinstalled 3dsmax Design and I wonder if that changed something. I attached a screenshot for reference.
Building Suite Premium Win 7, ultimate i7 1.86ghz, 4meg ram ATI 5730
If you set up a date to fill-in automatically when you open a drawing, will it update from day to day? Or once its set up, will it remain on that date..?
Do you have a macro or Diesel command that would select all text or dimensions in a drawing and delete it automatically. I've seen an LISP command, but I know from a fact that it does not work on LT. By the way, I'm using Autocad LT 2014.
Is there a macro/script/deisel that will automatically print a pdf (cute pdf autocad lt 2007) to current plot settings in current drawing directory and give it the current drawing view name and number? Disk space not a problem these days and would save time to have a pdf copy of all drawing tabs readily stored in the directory ready for issue.
Technique that can check the current plotter name for the current tab and assign it to a variable? i.e. can it be assigned to a variable to check if if equals "myplotter1". The next step - is there a technique to change the plotter name to "myplotter2.pc3".
I have partially done the latter part of this in the past using the -plot command line to ASSIGN a new plotter but I would really like to only run the routine if it really needs to.
I'm using AutoCAD LT 2012 and our client doesn't want/like sheet sets.
One item I'd love to have is the pg. number automated. In the current title block it's just text not an attribute. Is there a way I can take only a part of the file name and insert it as a field?
For example, the file name is DW_12321_12.dwg the last part of the name is the sheet number. Can I exclude everything but the 12 and insert just that into the field?
I am inserting a block into my drawing that has attributable text, and when I insert and pick the insertion point, the block prompts me immediately to fill in attributable text fields. My problem is that it runs through the sequence twice. How can I edit the block so it only does it once?
I want to programatically create a text style in the current database based on a font located in the AutoCAD /fonts folder. After that, I want to assign that text style to a newly created DBText.
I am close but can't quite get it. Let's see what I have:
I still got errors and left it as comment.
using (Transaction newTransaction = newDoc.Database.TransactionManager.StartTransaction()){ TextStyleTable newTextStyleTable = newTransaction.GetObject(newDoc.Database.TextStyleTableId, OpenMode.ForRead) as TextStyleTable; if (!newTextStyleTable.Has("ROMANS")) //The TextStyle is currently not in the database { newTextStyleTable.UpgradeOpen(); newTextStyleTableRecord = new TextStyleTableRecord(); newTextStyleTableRecord.FileName = "romans.shx"; [code].........
I get key not found error. Do i have to lock the document?