AutoCAD Inventor :: Condition IF For Macro

Aug 14, 2013

I trying create simply macro for my work. It is mass rename for *.ipt files and their iProperty.And i need create condition "IF" for this (example 2 files):

4-1903-01 Pachole.ipt  -> iProperties-Summary-Subject = nothing
4-1903-02-01 Dachole 2.ipt  -> iProperties-Summary-Subject = "4-1903-02" (first 9 symbols)

How to do it? Maybe find first symbol "space"

Public Sub UpdateDocs()'JDK 2013' Include REF to Microsoft Scripting Runtime Dim oApp As Application Set oApp = ThisApplication Dim oDoc As PartDocument Dim oPropSet As PropertySet Dim FSO As New Scripting.FileSystemObject Dim oFld As Scripting.Folder Dim oFile As Scripting.File Dim Path As String Dim sTitle As String.
[code]....

View 1 Replies


ADVERTISEMENT

AutoCAD Civil 3D :: Assembly Based On End Condition (not Start Condition)

Feb 28, 2013

I am using Civil3D 2011 and have a need to create an assembly that will take one of three options, depending on the tie-in condition points (e.g., the end of a link, not the beginning). As far as I can tell, Civil3D can discriminate which sub-assembly to choose based on conditions at the link starting point (e.g., if the start point is 2' of fill, it will select sub-assembly A; if the start point is 2' of cut, it will use sub-assembly B, etc.). However, I have a condition where the cut/fill conditions at the assembly start point have little to do with what I want the subsequen sub-assembly to do.

For simplicity's sake, you can imagine my "existing conditions" (2D) section as a flat-bottomed, U-shape with vertical sides (i.e., a trench); it's bottom width can vary.For the time-being, let us consider one side of an assembly in a fill condition only. Imagine that I want to satisfy design constraints but limiting fill quantities is a second priority; in instances when the bottom width is small, I would want the assembly to catch the existing trench with a 2:1 sideslope fill (or in Civil3D speak, a cut, because it would be upwards), so my finished surface is a now a V with the vertical faces above it. That works fine and dandy for a "trench" a few feet wide; however, imagine if that trench were 100s of feet wide - a 2:1 side slope would be a lot of fill for a ditch. So rather, I would want to "embank" the ditch - 2:1 side slope up (cut) to define my ditch XS, a horizontal link over to "embank" it, and then a 2:1 side slope down (fill) to catch the flat-bottom of my trench. So as you see, both situations have the same "Cut/Fill" condition (starting point) but drastically different end results.

View 9 Replies View Related

AutoCAD Inventor :: ILogic If Statement Condition Being Ignored?

May 16, 2013

I have the following code to clean up iProperties in idw files.

If ThisDoc.Document.documenttype=12292 Thendoc = ThisDrawing.ModelDocumentiProperties.Value("Project", "Revision Number") = doc.PropertySets.Item(1).Item("Revision Number").ValueiProperties.Value("Project", "Part Number")= ""iProperties.Value("Project", "Description")= ""iProperties.Value("Summary", "Title")=""iProperties.Value("Summary", "Subject")=""iProperties.Value("Summary", "Author")=""iProperties.Value("Project".
[code]....

For some reason, when this code runs, it always trys to execute the doc=ThisDrawing.ModelDocument, regardless of whether or not the IF statement condition is true. I am running Inventor 2012, SP2

View 2 Replies View Related

AutoCAD Inventor :: Condition Involving A Range Between Two Values?

Jan 18, 2012

I have to choose 1 of three views in a drawing using a range of values like:

if  ..........<10 then
ActiveSheet.View("VIEW1").View.Suppressed=False
else
ActiveSheet.View("VIEW1").View.Suppressed=true

[Code]....

The syntax that is in red upstairs gives me a error... What is the proper syntax to do this condition involving a range between two values???

Autodesk Factory Design Suite Ultimate 2014
Autodesk Simulation Mechanical
Autodesk Simulation CFD
Windows 7

View 4 Replies View Related

AutoCAD Inventor :: Adding Save Run Macro To Automatically Run Macro

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

AutoCAD Civil 3D :: How To Put Sub Assemblies In CUT Condition

Aug 17, 2010

How I can put the above mentioned Sub-Assemblies in a CUT condition?  They all default to a Fill condition (Attachment Point at Top of Wall).  I need it to have the attachment point at the Bottom of wall. I cannot seem to find where to do this?

View 5 Replies View Related

AutoCAD .NET :: How To Design A Group In A Query Condition

Dec 23, 2013

how to design a group in a query condition in AutoCAD 2011 MAp 3D I have 

Property: LAYER = CP*
AND (Data: CIRCUIT.CIRCUIT = BRN22
OR Data: CIRCUIT.CIRCUIT = BRN21)

I woudl like to get this into vb.net?

also, in vb.net when creating a new data condition....do I need to use datacondition.Table and Datacondition.Column? Im unsure what these mean?

View 1 Replies View Related

AutoCAD Civil 3D :: Assembly For Multiple Open Cut Condition?

Jun 5, 2013

I have an open cut area with 8 meter height and a bench of 5 meter for the first 3 berm, on the 4th berm the bench will become 10 meter. Is there any way to build it in assembly? I attached 2 drawings to clarify the problem.  

View 1 Replies View Related

AutoCAD Civil 3D :: Daylight Assembly - Fill / Cut Condition

Apr 8, 2012

I like to create a daylight assembly with following criterias

Fill/cut Condition

1. Target to surface 2.5% slope

2. If the surface is not met within 19 m from centreline, then till 19 m 2.5% slope and 33% slope afterwards till it hit the surface.

Civil3D 2012

View 2 Replies View Related

AutoCAD Civil 3D :: Subassembly Composer - Ditch Depth In Fill Condition

Feb 2, 2013

I am trying to create a custom subassembly using SAC 2012 that will place a 1' deep ditch at the bottom of the slope in a fill condition.  The trouble I am having is how to hold a consant 1' depth on the backslope and vary the foreslope since the daylight offset and elevation is variable depending on the slope of the existing ground.  I need the attachment point to be the edge of the shoulder so it seems like a loop that varies the foreslope length would be required but loops are not allowed.  I will also have the option to target a profile but I also need the ability to hold a constant ditch depth.

How to model this condition.

View 9 Replies View Related

AutoCAD Civil 3D :: Autodesk Subassembly Composer 2013 - Lane Outside Condition?

Jan 31, 2013

Does the 2013 subassembly composer include a way to include a condition based on LANE-OUTSIDE-SLOPE?

The figure below indicates the type of condition I would like to include (red arrows).

View 5 Replies View Related

AutoCAD Inventor :: How To Create A Macro

Sep 1, 2012

Is there a way to creat Macros in Inventor... like we used to do with AutoCAD?

View 5 Replies View Related

AutoCAD Inventor :: DXF Translator Macro

May 24, 2013

When I am done with a drawing (inventor .dwg), I manually go to "Save Copy As" and select DXF, and using my default options, save the drawing as a DXF on a server (OUTSIDE of vault) that our shop guys can access for CNC stuff. I understand there is a DXF Translator that I may be able to set to do this for me. How to use Inventor add-ins (my translator is loaded, thats as far as I got) or set them as macros. A button on the ribbon to export to DXF would be nice and I may also want to automate this further and have it do it on file save.

View 9 Replies View Related

AutoCAD Inventor :: How To Save All Changes Via Macro

Nov 11, 2010

We want to change iassemblies in a table using macro. When we change an iassemblies, inventor asks "Do you want to save changes to ......?". There are many iassemblies in our model, so it takes serious amount of time. We can disable all messages using macro, But this time after macro completion, there may be some errors in model, because we dont accept all changes. How can we accept all changes while running macro?

We use SilentOperation property. but in Save dialog, there are some parts indicated "yes" and some indicated "no". how can we change them "yes" and save all dependents?

View 9 Replies View Related

AutoCAD Inventor :: How To Place Macro

Sep 3, 2013

How do you insert macros available in the user community in to the inventor. I tried to open default.ivb file and copied in it but it doesn't work. Any example which shows how to place macros in the inventor.

View 1 Replies View Related

AutoCAD Inventor :: Run Addin From VBA Macro

Nov 9, 2011

How to call a addin from vba ? The addin is existing, source code not available :-(

My only idea is to somehow activate the button on the ribbon. Made a dump with the Print Ribbon routine from the online API help:

Tab: CDLIGHT, CDLIGHT.Part.Tab

Panel: iToolbox, CDLIGHT.iToolbox.Part.ToolBar

View 1 Replies View Related

AutoCAD Inventor :: Macro For Drawing Export To PDF?

Sep 12, 2013

I have one problem in this macro this macrofor drawing exporting to PDF.

How to save the pdf files in same location(Converting Drawing file location) and same number(Drawing file number).

Second one  is in my inventor window I opened 20 files of drawings and how to set the macro for export to pdf all the 20 files in once. 

Public Sub PublishPDF()
' Get the PDF translator Add-In.
Dim PDFAddIn As TranslatorAddIn

[Code]....

View 6 Replies View Related

AutoCAD Inventor :: Dropdown In Macro Menu

Apr 13, 2012

We just updated to 2013 this morning, and my macro isn't in the drop down (All Application Projects and Active Documents) menu like they were in 2012.

I haven't been able to find it when searching either.  I created a test macro, and it showed up: C:Userscad1AppDataLocalTempUserProject1.ivb

But still is not in the dropdown in the macro menu.  I'm using the same project that I had in 2012.Did installing 2013 remove/write over my maco? I imported my preferences this morning, they seem to be fine.

View 5 Replies View Related

AutoCAD Inventor :: Macro For Automating Assembly

Aug 21, 2009

Can we Make code for Selecting Part Automatically?

View 9 Replies View Related

AutoCAD Inventor :: Record Macro In 2014?

Dec 10, 2013

Is it possible to Record Macro in Inventor 2014?

If yes, how can I acieve this?

If No, Is there any Add-in or other possibilities? Any Add-in available?

View 9 Replies View Related

AutoCAD Inventor :: Converting Events Macro To Add-In

May 22, 2008

I have obtained a very useful macro from another discussion thread, [URL]....... It automatically names the frame members inserted by Frame Generator. I have modified the macro for our internal naming conventions, but the basic functionality is the same. I would like it to load automatically whenever I am in Inventor and believe an Add-In is the way to go. I have followed Brian Ekins "Taking the Step from VBA to Inventor Add-Ins" paper, but I think I am missing huge chunks on how Add-ins handle events and have been unsuccessful in finding any help topics. How to handle events in an add-in.

View 7 Replies View Related

AutoCAD Inventor :: Macro Starting Time

Nov 26, 2013

I added two macros to be run from a button in the ribbon.  The first time I run one of these macros after startup of Inventor, it takes a lot of time to run (approx. 5 sec.).  But the second and subsequent time the tools are ran, the process is pretty much instantaneous.  It's like the VBAeditor has to load on the background before the tool can process.

I arrived a this hypothesis because the VBA editor is taking around 5-10 seconds to load for the first time but after the tool (macro) has ran once, the VBA editor can be opened instantaneously.

View 4 Replies View Related

AutoCAD Inventor :: Title Block Macro

Jun 13, 2013

Malfunctioning Title Block Macro in Inventor 2014? The script is attached. I think there is a problem with datums. I have switched to a new computer and installed Inventor 2014 on it. The macro worked with my old computer and Inventor 2013. This is a .ivb-file, not a .txt-file. Please change that before you test it.

View 8 Replies View Related

AutoCAD Inventor :: Task Scheduler And Run API / Macro

Jun 27, 2012

Is there a way by which I can run a vba - macro over all the file in a folder using Task scheduler.

Config :: Intel (R) Xeon (R) CPU E31245 @ 3.30 GHz, 16.0 GB, 64bit win7
Inventor 2013 and Vault Basic 2013

View 3 Replies View Related

AutoCAD Inventor :: Run VBA Macro When Save Is Pressed On IPT Files

Jan 27, 2011

Is it possible to run a VBA macro every time the "Save" button is pressed on "IPT" files?

View 9 Replies View Related

AutoCAD Inventor :: Automatically Saving Assembly Macro

Sep 4, 2012

I have made a macro that asks for a location on the file server (=client name) and then the project name. It then automatic creates the correct folders, opens my custom assembly template and changes an ipart that is by default in it.

That's all great and can save us a ton of time, but the last step is to automatic save the assembly! I just can't get it working and can't find the correct code.

I have defined the target folder earlier and the file name of the assembly is identical to this folder. For example

target folder = O:ProjectsclientNameClientProject1
file name = ClientProject1.iam
-> result: O:ProjectsclientNameClientProject1ClientProject1.iam

the code that I think should work looks like this:

Sub SaveAssembly() Dim oAssDoc As AssemblyDocument Set oAssDoc = ThisApplication.ActiveDocument oAssDoc.SaveAs ("O:ProjectsclientNameClientProject1ClientProject1.iam", False)End Sub

But it doesn't work, I always get the error message
"Compile error: Expected: ="
Whatever I do next I don't get the code to work

View 3 Replies View Related

AutoCAD Inventor :: Macro To Create Revolved Part

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

AutoCAD Inventor :: Shortcut Key For Macro Doesn't Stick

Dec 9, 2011

I use this macro to toggle my browser from Model to Vault, and have since IV2009, and I have always used a shortcut key combination to access it.  Now that I have installed 2012, the keyboard shortcut doesn't stick.  Every time I close Inventor and re-open it, I have to reassign the key combination to this macro. This equals annoying! Maybe I didn't properly implement the macro in VB? 

View 4 Replies View Related

AutoCAD Inventor :: Set IDW File (Base View) Via A Macro

Oct 9, 2013

I need, using a macro, the ability to pre set the file that I am going to use as a "Base View" on a IDW file.

I call the ipt file "FRED.IPT", when I run the macro, it opens a new clean idw sheet and pre-sets the "Base View" to "FRED.IPT".

or

Automatically open a clean idw sheet and place the file "FRED.IPT" on the sheet, automatically.

View 1 Replies View Related

AutoCAD Inventor :: Macro To Switch Projects And Vaults?

Mar 3, 2010

My system is setup to use different projects and vaults depending on which department one is working. I have been jumping back and forth and was trying to find a macro to quickly switch projects, log out of the current vault, and log back into a different vault. I have minimal experience with macros and none with macros in Inventor . I am using Inventor 2009.

View 1 Replies View Related

AutoCAD Inventor :: Macro Failed When PDF File Is Already Open

Sep 17, 2013

I created a macro for generate a PDF drawing, but when one file has been already created, AND he's already open, the macro don't work.

How to stop the macro automatically and notify that the macro has been stopped because the file is open.

Below, the current macro :
 
Sub PublishPDF()'Get the PDF translator Add-In.Dim PDFAddin As TranslatorAddInSet PDFAddin = ThisApplication.ApplicationAddIns.ItemById("{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}")'Set a reference to the active document (the document to be published).Dim oDocument As DocumentSet oDocument = ThisApplication.ActiveDocumentDim oContext As TranslationContextSet oContext = ThisApplication.TransientObjects.CreateTranslationContextoContext.Type = kFileBrowseIOMechanism
[Code] ....

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved