AutoCad 2D :: Calculations To Create Macro Button In Excel
May 23, 2012
After starting my previous thread "What formula will work to achieve this result" I decided to post this new thread because I have changed my mind and will now be using the external Excel file that the "Extract Data" creates to do my calculations.
Here's what I would like to do: create a Macro [button] in Excel with the following conditions:
*
Sample of excel spreadsheet:
*
MANUF NoSUB No.DESCRIPTION** UNIT QUANTITY
A123494456TYPE A, XXXX XXX * * * * EA** * * * 45
A423520374YA1AM, XXXXXXXXXX * **EA** * * * 55
A148231375TYPE B, XXXXXXXXX * * * EA** * * * 33
A146151725A1AAM, XXXXXXXXXX * * EA** * * * 67
A135621873TYPE A, XXXXXXXXX * * * EA** * * * 24
1. * * * CONDITION #1:
IF "DESCRIPTION" TAB ["C" COLUMN] CONTAINS "TYPE A" AS PART OF TEXT/DESCRIPTION, TAKE THE "QUANTITY" TAB ["E" COLUMN] SPECIFIED ON THAT PARTICULAR ROW AND DIVIDE IT BY 20, ROUNDED UP TO NEAREST ONE.*
2. * * * CONDITION #2:
IF "DESCRIPTION" ["C" COLUMN] CONTAINS "TYPE B" AS PART OF TEXT/DESCRIPTION, TAKE THE "QUANTITY" SPECIFIED ON THAT PARTICULAR ROW ["E" COLUMN] AND DIVIDE IT BY 10, ROUNDED UP TO NEAREST ONE.
3. * * * AUTOMATICALLY SAVE THE EXCEL FILE AFTER THIS MACRO HAS BEEN UTILIZED.
View 4 Replies
ADVERTISEMENT
Jan 12, 2012
I'm trying to create button with macro to edit existing text in place, with predefined text with macro .... For example, existing text is "Old text", and I want this text (or whatever I select) to edit in place with click on macro button to change it to "New text".
View 1 Replies
View Related
Dec 20, 2012
I create macro button for two circles.if we click that button a guidelines create the center of both these circles. i have new in coreldraw VBA.
View 2 Replies
View Related
Feb 13, 2012
What I would like to do is create volume calculations from spot heights. All i have is 4 rectangles with a 10m interval, nine elevations, no points or anything else.
What steps do i have to go through to make this possible?
View 8 Replies
View Related
Jun 21, 2012
I have created a ribbon bar in autocad 2012 using API and c#. On ribbon button i am executing a Command method which display a wizard for copying some files.
Now i want to run a macro before executing the ribbon button command method. Which display a message box with yes and no . if user click yes command method will executes itself and display wizard for copy files.
If user click no command method will not execute and return. This will allow user to use macro for customizing the file copy process.
View 4 Replies
View Related
Jun 29, 2012
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.
View 3 Replies
View Related
Nov 10, 2012
i want to call an excel macro from a lisp. is it possible?
now i have this:
(startapp "C:\Program Files (x86)\Microsoft Office\Office12\Excel.exe"
(strcat """
(getvar 'dwgprefix)
(vl-filename-base (getvar 'dwgname))
"XXX.xls""
)
)
i just want it to run macro1 from book1.xls
View 2 Replies
View Related
Jan 3, 2012
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)
View 1 Replies
View Related
Jun 21, 2012
We have some custom macro's running in Inventor wich we call from the ribbon > user commands.
In Inventor 2011 we used the large and small together and the icon's were shown properly.
Now we have moved to Inventor 2013 and the large icon's arnen't shown properly. They display as an large orange @ signin a square box.
The Icon's meet al the requirement, .bpm, 16x16 & 32x32 pix, 24 bit, naming (Modulename.Macronam.Small/Large.bmp)
View 9 Replies
View Related
Jun 28, 2012
I am trying to create a short cut button with a macor code.
I want it to set up a new orgin and set a base point in xrefs i am creating
The commands i want to combined are the follwoing
UCS enter
3P enter
BASE enter
The macro i am using is the following
^c^c_ucs 3p \_base
but it wont run the base command after it finishes the 3P command
This is whats show up in my commands bar
Command: _ucs
Current ucs name: *WORLD*
Specify origin of UCS or [Face/NAmed/OBject/Previous/View/World/X/Y/Z/ZAxis]
<World>: 3p
[Code]....
View 4 Replies
View Related
Jun 16, 2011
I know I can make a button on the ribbon for running a specific macro. But, is this possible for iLogic rules? I would love to be able to run rules and launch forms from the ribbon!?
View 5 Replies
View Related
Jun 14, 2013
I am looking for an example excel macro to zoom to an object given the obect entities handle.
View 2 Replies
View Related
Jun 1, 2011
I have a VB script that I created in excel that does a number of things. At some point I want it to open a series of variable Draw documents based on names and paths from columns in an excel document. This part works fine. However, I also want to perform a macro, created in CorelDraw, on said files once opened. This macro also works fine. The issue I am having is getting Excel to tell Draw to run the macro. I wrote the line with the same syntax I would use for telling excel to run a Word macro. IDK.
Set CorelDrawApp = CreateObject("CorelDraw.Application.15")
CorelDrawApp.Visible = True
Dim i As Long
[Code]....
View 8 Replies
View Related
Feb 7, 2012
I'm trying to create a macro for a toolbar button to open a third party program. Basically we want to open a custom .exe application from a button on the ACAD toolbar.
View 5 Replies
View Related
Aug 5, 2012
And in the 157 page Macro PDF (really, did it need to be this long? How about an easy-command sheet), it says you can use the key command Ctrl+Shift+R to start recording... Well, that brings up the ruler.
I use Macros a lot in Excel (I record the commands that I want, then tweak in the editor), so I get how they are supposed to work - but I'm no programmer, and without the ability to record, I'm completely handcuffed. This really shouldn't be 1% as difficult as it has been
View 6 Replies
View Related
Sep 1, 2012
Is there a way to creat Macros in Inventor... like we used to do with AutoCAD?
View 5 Replies
View Related
Aug 28, 2013
Looking for example macro that can create a new sketch, add a few lines and arcs, Then revolve the sketch around an axis to create a solid part. For example a shaft?
View 2 Replies
View Related
Jan 16, 2013
I am using inv2011. I have to create rec. blocks very often and in inv2011 . I have to constraint it in middle.
Can i write a Macto that gives me constraint rec block in sketch. This feature already available in Inv12.
View 5 Replies
View Related
Oct 4, 2012
I have (unfortunately) the necessity to modify into some files (which are used as models) the print style preset.
These files, which are necessary for the realization of electrical diagrams, have inside hundreds of layout.
Each layout set default printing parameters, so as "Laser b/n.pc3," as the paper size "A4" scale "Scale to Fit", and plot style "Schemi.ctb", etc. ..
Is there a way to create a macro (a field unknown to me) or something similar, to automatically change in all the default layout, for example, the printer "Colori.pc3" and the print style in "Schemi_colori.ctb "?
View 5 Replies
View Related
Oct 19, 2011
I have a macro that I acquired somewhere (possibly these boards, can't remember now) for placing a parts list. I have modified it somewhat to change the location on the sheet where the list gets placed, as well as a sub that starts the autoballoon command afterward.
The macro is set up to place the parts list in the upper left corner, by adding the parts list width to the Mini Point of the border. This works perfectly well, except that we have two parts list styles, and they are differently sized.
What I would like to do is have the macro detect the parts list style, and change the offset value depending on which style it finds. I am an extreme novice with the API, who basically knows just enough to tweak sample code a bit, and have not been able to find anything close enough to use as an example.
How I should go about this, or even post some samples of something similar? Current code is shown below.
Public Sub CreatePartsList() On Error Resume Next ' Set a reference to the drawing document. ' This assumes a drawing document is active. Dim oDrawDoc As DrawingDocument Set oDrawDoc = ThisApplication.ActiveDocument 'Set a reference to the active sheet. Dim oSheet As Sheet Set oSheet = oDrawDoc.ActiveSheet ' Set a reference to the first drawing view on ' the sheet. This assumes the first drawing ' view on the sheet is not a draft view. Dim oDrawingView As DrawingView Set oDrawingView = [code].......
The macro does not have to set the parts list style - that is controlled by the drawing Standard. It just needs to detect what it is, and place the list accordingly.
View 7 Replies
View Related
Dec 30, 2012
I have been using the addin "Save Run Macro" to automatically run a macro every time the "Save" button is pressed.
Any of the following questions about "Save Run Macro"?
1] When I protect the macro from viewing (so I can protect my code) "Save Run Macro" does not see the macro.
2] When I save the part for the first time (ipt, iam or idw/dwg) the macro does not run. I always need to run the macro again.
View 1 Replies
View Related
May 23, 2012
How to create a ribbon with a button. I am creating an add-in for Inventor. I am trying to put this code in the Activate Sub but it's not adding the ribbon once I open a drawing. Just trying to use this example to get me started.
public void AddParallelEnvironment(){ Application oApp = ThisApplication; // Get the Environments collection Environments oEnvironments = oApp.UserInterfaceManager.Environments; // Create a new environment Inventor.Environment oNewEnv = oEnvironments.Add("Some Analysis", "SomeAnalysis", null, null, null); // Get the ribbon associated with the assembly environment
[Code] ..........
View 1 Replies
View Related
Mar 12, 2013
I've created a button that I've implemented into inventor. However I am at a loss as to how to create an icon for the button. I've read all the articles i can find (such as)
[URL]..
[URL]....
I've restarted the program and the computer multiple times but to no avail.
View 6 Replies
View Related
Jan 9, 2014
I am trying to create a new sheet in an existing excel file and can not figure out how to do it.
I am trying to export parts lists from multiple drawings to an exisitng excel spreadsheet and I'd like have each on their own sheet. I can do everything but create a sheet. How to do this in iLogic?
Inventor Pro 2013 (PDS Ultimate)
Vault Pro 2013
Windows 7 64
Xeon 2.4 Ghz 12GB
View 2 Replies
View Related
Aug 27, 2013
Q) A user will enter information for a new drawing into the Excel file, this will generate an autocad drawing (title block and attribute information) and fill in the title block based on the information in excel file.
OR
Q) a user will create a new autocad drawing from the new templates and fill in the title block. This information will automatically fill in the Excel file.
View 3 Replies
View Related
Dec 6, 2011
I would like to link a cell value in excel with the partnumber from a assembly in Inventor. How can I made this link?
View 1 Replies
View Related
Jun 27, 2012
How to create a excel file using ilogic?
View 6 Replies
View Related
Feb 9, 2012
I am looking to import an excel file to creat points within LT 2012. Can this be done?
View 4 Replies
View Related
Mar 23, 2012
I am looking for creating a button that will open a PDF file (Manual). The purpose would be to have our users open our draftig procedures manual by clicking this button without the need to close autocad.
View 2 Replies
View Related
Jul 17, 2012
I'd like to know if it is possible to create a custom button with existing command in inventor.
View 1 Replies
View Related
Nov 16, 2010
In the save as dialog box, the button for creating a new folder will automatically create a named "new folder" at the bottom of the files list. It does not come up highlighted for naming but can be right-clicked, renamed. If your files list is long you won't even see the new folder created as it does not snap to the folder either. Conversely; I can still right-click, new, folder. This acts as expected which creates folder at the top of files list, highlighted for naming.
View 6 Replies
View Related