AutoCAD Inventor :: ILogic Rule Or VBA Routine To Rename Files In Vault
Dec 7, 2012see attached link for the explaination of what I am looking for.
[URL]
see attached link for the explaination of what I am looking for.
[URL]
I'm running Invenor 2013 and I'm trying to figure out a way to rename my components from an iLogic assembly when placed in a new assembly.
Right now when I start a new assembly, then place an iLogic component it names everything "Part-01," Part1-01" and so on for all of the variable components.
What I'd like to do is write a rule that when placing my iLogic component it will name it based on the filename of the new assembly that I've created. "Part-New Assmebly," "Part1-New Assembly" and so on.
is it possible to rename the browser node on part level with an iLogic rule? I know that in the assembly environment is an Inventor OOTB functionality to rename the nodes to the filename, Part number or the default value.
Inventor Professional 2011
Windows 7 Enterprise 64bit
Dell Precision M4500
Intel(R) Core(TM) i7 CPU Q 820 @ 1.73GHz
8 GB RAM
What would be the quickest way to rename files in Vault?
I have lets say 100 parts with prefix 1012.
I want to change to 1014.
I can hightlight all parts in Vault, go rename and then replace prefix manually for each part.
Seems hectic.Any quicker, more automatic way?
Adding prefix does not work since does not replaces but adds.
I have an iLogic rule that I want to add to several files that are already existing. Is there an "easy" way to do this other than opening each and every file, creating a new rule, pasting in the code and then saving the file? If I had a macro that would create the rule I could run it with KwikBatch.
Using R2010/11
I have the need filter inside Vault the Inventor Drawings (.dwg/.idw) by its papersize.
In my testing enviroment, I created a iLogic rule inside a .idw with the following
iProperties.Value("Custom", "Formato") = ActiveSheet.Size
I used the Ruler Trigger "After Save Document" to refresh this rule.
In Vault, I've mapped this custom property:
But, how to Copy (and update) this iLogic Rule to the other existing .dwg files in Vault?
I thought the iLogic Design Copy would be able to do so, but it doesn't works in that way.
Is there a way to invoke the iLogic Rule Editor and pass it an existing rule name or external rule for editing?
View 4 Replies View RelatedI need a way to run a rule which is saved in my top-level assembly using iLogic rule which is saved in a part file in the parent assembly.
I have even tried using an external rule in a txt file, but that gives the error "Component: This function can only be used in an assembly." - which makes no sense to me. I hope I am just missing something simple. I cant believe with all its other strengths, that iLogic would be so limited in that regard. Why is there not simply a snippet under the 'Run Other' that allows you to specify an assembly file and the rule name? (like there is for running a rule in a component from the assembly)
I want to simply set a custom iproperty as the Description in each part file within my assembly. I can do this easily at part level with ilogic but I want to be able to run the rule from the assembly level and all the parts run the rule. I am struggling to find a way to do this.
I think this may be the best method I have found but I think it must be far easier?
[URL].......
I am working for customer with a simple item with his iLogic design. He has created a simple form to modify his iProperties. To modify the current material, a multi-value parameter was created and the following rule as a local rule;
"MultiValue.List("MATLIST") = iProperties.Materials
iProperties.Material = MATLIST"
He is now trying to make this an external rule but gets the following error
Error in rule: Mat2, in document: Mat2.iLogicVb
iProperties.Material: is probably a bad material name.
The more info tab says:
System.ArgumentException: iProperties.Material: is probably a bad material name.
at iLogic.CadPropertiesInRule.SetDocMaterial(Document doc, String matName)
at LmiRuleScript.Main()
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)
how can I close an iLogic Form from either an iLogic Rule, or a VBA Rule (VBA is the Preferred method)?
View 5 Replies View RelatedI have a vaulted project with about 1000 parts in it and a subfolder within that that has about 250 parts in it.I am told that vault does not manage references outside the project scope as defined by the IPJ which in theis case is at that 1000 part folder level.
If I go to rename the folder with 250 parts in it, it takes up to a half hour. I am having trouble believing that vault can't do better than a half hour to manage the references of a subfolder of a project with 1000 parts in it, when only 250 parts are affected.
Also, I notice a secondary ipj file is created temporarily during the renaming. That ipj appears under an inventor folder under my docs. Can't see why it takes two ipj files to manage one project. Also don't understand why there should be a local ipj file active when I am renaming at the vault level. I am suspicious that this other ipj (named after my company name, indicating a purposeful act) is expanding the scope of reference management since its parent resides at the root Vault explorer ($) separate of the projecy ipj. Also takes way too long to rename individual files.
I want to create a rule that will warn the user when the plate thickness they are using is not standard. I have already created a multivalue parameter for plate thickness, which lists all standard steel plate thickness's and also allows for custom values.
I was hoping I could create a rule that would prompt a dialogue box warning when the user creates a custom value for plate thickness.
I know this can be done, but like I said, Im bloody useless with iLogic and find it hard to come across relevent examples and/or tutorials online.
I'm currently using this rule for easy PDF making
SaveLoc = "C:Temp"FileName = ThisDoc.FileName(False)Revnr = " rev_" & iProperties.Value("Project", "Revision Number")PDFnaam = SaveLoc & FileName & RevnrThisDoc.Document.SaveAs(PDFnaam & (".pdf") , True)MessageBox.Show("PDF is aangemaakt in C:Temp", "Document creation",MessageBoxButtons.OK,MessageBoxIcon.Information)
The problem with this is that i want to save without lineweight? is there anyway to do this with this code?
I have an ilogic rule with multiple Subs. How could I run one specific sub contained in that rule from an iLogic form or another rule?
View 2 Replies View Relatedi have an iLogic rule in serveral files. Now this rule has to be deleted. This should be done with VBA. I can not find any function to delete a rule using VBA.
I found a function iLogicAuto.RunRuleDirect(rule), but not iLogicAuto.DeleteRule(rule) ...
I can not find any documentation for iLogic/VBA.
I have an iPart which includes iLogic Rule. When I change iPart by table, iLogic Rules are not triggered.
In iLogic Utilities, there is a button "Rules Triggered by Events", If I use "Any Model Parameter Change", the update need long time, looks like Inventor is "No Response". I like the way "Material Change", but I need "part Number" change to trigger the rules. How can I do it? I tried other events as After Open, Before Save, etc, they are does not work.
I have a rule setup for drawings. I need the rule to first determine if the there is a flat pattern view present. In other words, if there is no flat patter view, I want to the rule to stop.
I am very green to ilogic and VB. Running Inventor 2013.
I've caught glimpses of how to do this (For instance, this plugin (Inventor LinkParameters) [URL]...... when trying to actually find information on any documentation of how to get from point A to point B. I can't seem to find anything about ilogic automation / rule creation / ilogic in general, in the object browser at all.
I know code like this exists
Option ExplicitSub RuniLogicRule()Dim iLogicAuto As ObjectSet iLogicAuto = GetiLogicAddin(ThisApplication)If (iLogicAuto Is Nothing) Then Exit SubDim doc As DocumentSet doc = ThisApplication.ActiveDocumentDim ruleName As StringruleName = "Rule0"Dim rule As ObjectSet rule = iLogicAuto.GetRule(doc, "Rule0")If (rule Is Nothing) Then Call MsgBox("No rule named " & ruleName & " was found in the [code].......
(and even fixed the error it gave me due to the original code leaving something out) , but any info on the GetRule method is.
I am looking for a way to log out of vault from within Inventor using iLogic codes. I have created an iLogic rule that automates export an assembly drawing and all sub component drawings. In my code, I have suppressed all Inventor prompts but I do not have a way to suppress Vault prompts. I can manually log off from vault and run this rule without any problems. However, if I forget to do so, I am stuck responding to update requests from vault and check out requests constantly for each and every file.
any iLogic code to log in and log out of vault?
I'm wondering if it is possible to check-in drawing into vault using i-logic?
If you check-in a drawing into our vault, it automaticly exports a .dwf to a storage server. We also have a simple button for making .pdf of the drawing to sent to the customer.
What i want to ensure is that the .dwf file and the .pdf file are the same. So when i press "make a .pdf" the rule will save my document, make a .pdf and (if possible) check it into vault. So from that point the .pdf for the client and the .dwf on the server are the same.
Inventor 2013
The following rule works perfectly as an external rule except the Materiial and Appearnace pull downs do not update. I know I am missing something easy. Here is my code
'Set the materials libraryassetLib = ThisApplication.AssetLibraries("iLogicTestMatLib")'Set the current document activeoMy Parameter= ThisApplication. ActiveDocument.ComponentDefinition.Parameters.UserParameters'Turn off error reporting on parameters and.
[code]....
Is there any way to create a rule to create a substitute on my weldment files?
what I need is something like:
If this document file type is weldment then create shrinkwrap substitute, go to the file (substitute) read the custom iproperty "area" and write to this document custom iproperty "area for sand-blasting" activate LOD Master then delete substitute LOD.
The propose is for purchase department to know the area of the assembly (only the area of visible surfaces).
Is there any command/option to add a keyboard shortcut for ilogic rule?
Config :: Intel (R) Xeon (R) CPU E31245 @ 3.30 GHz, 16.0 GB, 64bit win7
Inventor 2013 and Vault Basic 2013
When i trying to create a new ilogic rule i get window with this error:
Spoiler (Highlight to read)System.InvalidCastException: Невозможно выполнить приведение [A]iLogic.CodeSnippets к [B]iLogic.CodeSnippets. Источником типа A является "Autodesk.iLogic, Version=17.0.13800.0, Culture=neutral, PublicKeyToken=null" в контексте "Default" в расположении "C:PROGRA~1AutodeskINVENT~1BinAutodesk.iLogic.dll". Источником типа B является "Autodesk.iLogic, Version=17.0.13800.0, Culture=neutral, PublicKeyToken=null" в контексте "LoadFrom" в расположении
[code]..........
I would like to make an External Rule that would make an iLogic Internal Rule (with the same code every time). I guess what I really need is a way to drive an Ilogic rule into every part that does not have the rule in the part already.
I know what you’re thinking and just using the External Rule doesn’t work for what I want to do. I need it to be an iLogic Internal Rule.
Is there someway to launch an external iLogic rule with VBA?. I'd like to add a button to run the iLogic rule.
Inventor Pro 2013 (PDS Ultimate)
Vault Pro 2013
Windows 7 64
Xeon 2.4 Ghz 12GB
Is there a way to set the colour of a part using the RGB value? (or perhaps the hexdecimal value?)I know I can set colours in iLogic by specifying an existing colour (ex... iProperties.PartColor = "Green")
I want to avoid adding the colour to Inventor as a custom colour, then referencing it in iLogic... The goal is, if a user specifies the finish on this part to be this colour, it will always be that RGB value (our standard in-house paint colour). I don't want to add it to the Inventor 'colors' design data... when we upgrade to the next version of Inventor, it's one more item we have to remember to carry over!.
I got this error popping up every time I open an iLogic edit rule and all my snippets are gone. Now it has started doing it on a different computer in our office. The error dialog box is in the image below. T
View 4 Replies View RelatedWe are using Inventor 2011.
I have found a rouind about way to display document thumbnails in VBA in 64 bit windows 7 inventor.
The only piece of the puzzle I am missing is for a way to push a document object or a document file name into an iLogic Rule from VBA.
Below is a 64 bit thumbnail solution for VBA sans the input.
Essentially I am launching an iLogic Rule from VBA that pushes an inventor document object into a VB.NET dll.
The dll converts the iPictureDisp into a VB.NET image object, reduces the size then converts it into a byte array.
The byte array is passed back to VBA through the same iLogic Rule.
Once the byte array is received it is converted back into an iPictureDisp object.
' ----------------------------------------
' --- VBA Project Form Code ---
' ----------------------------------------
Option Explicit
Private Sub Command1_Click()
End Sub
' -------------------------------------------
' --- VBA Project Module Code ---
' -------------------------------------------
Option Explicit
Public Sub SetPic(ByRef bBuffer() As Byte)
Set UserForm1.Pic.Picture = PictureFromRes(bBuffer)
End Sub
[Code]....
I have a rule in iLogic that I was testing as "Straight VB.Net" on various assemblies. It was working alright, but I was making some minor tweaks to eliminate errors. Now, all of a sudden, it is unresponsive. Completely. No errors, no "busy" symbol over my pointer, just nothing. I put in the line MsgBox("Begin") as the first line of the program to see if it was even getting into it, and still there is no response. I run the rule, and absolutely nothing happens. I tried writing it in iLogic instead, and that does make something happen. what might cause the VB.Net element of iLogic to stop working, and hopefully how to correct the problem as well?
View 2 Replies View Related