AutoCAD Inventor :: Delete Rule With Internal Macro VBA?
Nov 8, 2013What is the code to delete an internal rule of a document using a macro vba?
View 5 RepliesWhat is the code to delete an internal rule of a document using a macro vba?
View 5 Repliesi 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 assembly which includes lot of parts (*.ipt) or sub-assembly (*.iam). I have some ilogic rules to control to suppress or un suppress them.
Now for the released assembly, I want delete all suppressed components by ilogic rule.
I made an Part with iLogic rules, let's call it "iLogicPart". The rules inside could create lot of different part by my input.
I want save the different parts to different name as "Part 1", "Part 2", etc. I used SaveAs to get them.
My question is: I want to delete all rules and parameters in the saved parts as "Part 1", "Part 2". And I have lot of features (the name is hard to track) which are inactive, I want to delete them at same time too.
I could manually do so, but I want to use rule to do so automatically.
I wish to delete all project geometry in the active drawingsketch with 1 click
But unsure how to get to these constraints.
Are these geometricConstraints?
What I have now doesnt work:
Select Case ThisDoc.Document.DocumentType
Case 12292:
Case Else: MsgBox("Current Document not a drawing document")
Exit Sub
End Select
[Code] .......
Constraint to unresolved reference geometry. Finding these magenta broken links items in a sketch is time consuming. Is there a macro that can delete them all?
View 2 Replies View RelatedIs 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)
This problem started yesterday after I moved some of my library to an external hard drive. I created a new catalog and moved the photos within lightroom. I don't know if the move of photos caused the error or not. Now whenever I try to delete rejected photos, I get the following error message:
Database "/Users/mollynordin/Pictures/Lightroom/Lightroom 4 Catalog.lrcat": PreviewDataObservers_DevSettingsDeletions.devSettingsDigest may not be NULL Statement:
DELETE FROM Adobe_imageDevelopSettings WHERE id_local = ?;
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.
I have just had a new 1TB internal hard drive installed in my PC and then the original smaller internal 500GB hard drive cloned onto it. The new 1TB is now Local Dick C and the smaller 500GB has been changed from C and is now Local Disk F. PSE11 is running from the new C and all my pictures are on both C and F but the catalogue is pointing to F. I want to delete all of the old files on F to free up space since they are all cloned to the new 1TB C, so I want the PSE11 catalogue to point only to the pictures on C. I have tried creating a new Catalogue and importing my pictures from C. The images come in and look connected to C but, when I close PSE11 and then reopen that new catalogue, the image path reads F, as does the original catalogue. So, now I have two catalogues apparently point to F but I want to: 1) have only one catalogue pointing to C; 2) the delete catalogues pointing to F; 3) then reformat F: so I have a clean 500GB old hard drive for future expansion.
View 6 Replies View RelatedI am trying to use iLogic to create the file types I need to give to my vendors once I have created a drawing.In the .idw file I have a rule that creates a .pdf file and .dwg file. I also want it to activate a rule I have in the .ipt file that creates a .dxf file.
trigger = iTrigger0oType=Left(ThisDoc.FileName(False),3)GoExcel.Open("S:DRAWINGSFolder Types.xlsx", "Sheet1")For rowPN = 1 To 200 If (GoExcel .CellValue("A" & rowPN) = oType) Then oFile = GoExcel.CellValue("C" & rowPN) Exit For End IfNextoFolder = "S:DRAWINGSNOT RELEASED" & oFileIf Not System.IO.Directory.Exists(oFolder) ThenSystem.IO.Directory.CreateDirectory(oFolder)End IfThisDoc.Document.SaveAs(oFolder & "" &
[code].....
Now that SP2 is out and we can delete all in one sweep, is it possible to create a macro that would automatically delete all color styles as soon as any file is open? I never use that feature and would gladly pay for such a macro.
View 14 Replies View RelatedI've playing around trying to write a macro that with the click of one button will remove all my guidelines, not hide them, delete them. I can't seem to make it work.
View 8 Replies View RelatedWith the code below, I can delete off-page objects...as long as they are assigned the Desktop layer. If there is no object on that layer, I want a warning box to pop up stating so. How can I do this? I imagine that I'll need If then statement something like 'If .....objects on layer Desktop <0 then pop up warning message box, end if.
Private Sub CommandButton4_Click() ActiveDocument.BeginCommandGroupActiveDocument.MasterPage.DesktopLayer.Shapes.All.Delete ActiveDocument.EndCommandGroupEnd Sub
I would like to know if there is any possibility to replace a component with another one, that has a different internal name. Losing the dependencies would be acceptable.
ReplaceReference and PutLogicalFileNameUsingFull always return the error "wrong parameter".
how we can design a set of internal gears?
View 1 Replies View RelatedI keep getting this message when opening an assembly;
Internal error in persistence operation (Can't load segment PmResultSegment via a RSeRef when loading segment PmDCSegment)
The solution is to find the corrupted part and restore it.
My problem is that the assembly (and 5 subassemblies) consists of over 150 parts, which is way to many to just start recreating parts at random...
Is there a way to pin-point which parts ruins my model ?
I´d like to do something like that, convert a internal volume in a solid and delete the external solid.
[URL]
I am using a circular pattern to re-position an internal keyway and am wondering if it is possible to supress the original keyway? Right now I have to give it a 'Placement' value of 2 to get the keyway to shift the amount I want, and as such it keeps the original as well as the new (overlapping them). I wish to suppress only the original one leaving new one...
Inventor 2014 PDS
Just installed 2012 Pro last week and tried to run FEA today. Everything else is running fine. Started with existing model and had this error. Went to a simple part with rectangle sketch 6x1x.125thk and still receive error. Found multiple issues with mesher errors in forum. So I removed all Autodesk products, cleaned registry, turned off antivirus and reinstalled software and SP1 and still receive error.
View 9 Replies View RelatedTrying to make an internal gear with design generator. I fill in appropriate info, click the 'internal' check box and when I generate I still get an external gear (using component).
Tried creating a part with the proper bore (root) diameter first and use feature...it wipes out my part and creates and external gear with virtually no bore.
I made internal gears with design accelerator.
It's calculation is OK. And drag it,the rotation is good, But the direction is opposite. The tooth's move opposite direction to each other.
I used Autodesk Inventor 2013, And sp2, update DL22436649.zip But, this appeard before And after sp2 patch.
Experts, how do I get a list of all internal iproperty names in Autodesk Inventor 2012
View 1 Replies View RelatedI 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 have an ilogic external rule which contains functions that I use from rules in my local assembly document. I'm trying to access the value of a parameter in the document from the external rule's function. Attached is a simple version of what I'm trying to do. If I manually run the external rule, it seems to work just fine, but when I call on the function from a seperate rule, its unable to get the parameter value. I get an error stating, "'Parameter' is not declared. It may be inaccessible due to its protection level."
'this is the external rule. if I run this manually, it works
Public Class test_functionsSub Mainmyresult = ""thisisatest(myresult)MsgBox(myresult)End SubFunction thisisatest(ByRef resultcreated As String)resultcreated = "it worked - " & Parameter("ParameterInDocument")End FunctionEnd Class
'this is my rule in the assembly document trying to use the external rule's function
AddVbFile "z_testrule.iLogicVb"Dim external_rule As New test_functionsmyresult = ""external_rule.thisisatest(myresult)MsgBox(myresult)
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 made a very simple "Junction" model which could generate different model per input.
My problem is: my model did not update before run "Save File" rule which made the saved model is not correct.
I have to use ilogic rule to save this model instead of "Save As" in Inventor menu.
"Junction" model which include some rules is included.
My current Version is:
Inventer Professional 2013 64-Bit Edition Build 200 release: 2013 SP2.
Autodesk Inventor Professional 2013 (64 Bit) SP2
Windows 7 Professional Service Pack 1
Intel(R) Xeon(R) CPU E5645
12.0 GB Memory