• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Autodesk Inventor

    Reply
    Member
    Posts: 5
    Registered: ‎03-13-2012
    Accepted Solution

    iLogic help needed

    614 Views, 11 Replies
    07-28-2012 06:07 PM

    I am new to the ilogic. I am wanting to use ilogic to update some prints as needed.

     

     I need to create and external rule to:

    1) migrate the drawing to the lastest inventor version (2012),

    2) copy all drawing resources (borders, title blocks, and sketched symbols) from a template file (.idw),

    3) replace the title block and border with specified block and border. 

     

    Any help would be appreciated.

    Please use plain text.
    *Expert Elite*
    Posts: 860
    Registered: ‎02-16-2006

    Re: iLogic help needed

    07-29-2012 08:40 AM in reply to: ryan.cotton

    If it's one drawing just open and save.

    Copy the resources from template to drawing.

     

    If you are doing many drawings.

    Task Scheduler will do 1)

    Drawing resource transfer wizard will do 2)

    If the title block and border have the same names in target and source drawings, Drawing resource transfer wizard will do 3) too.

     

    If the names are different in the template source and drawing target, in the template create copies of title and border with the target title and border names then you can replace.

     

    Please use plain text.
    Member
    Posts: 5
    Registered: ‎03-13-2012

    Re: iLogic help needed

    07-29-2012 09:29 AM in reply to: ryan.cotton
    I am doing multiple prints. I have tried what you have described.

    The task scheduler only migrates some idws. The drawing resource wizard is great, but takes too much time and I have to manually migrate the drawings.

    Can ilogic perform the tasks I mentioned in the first post? I would like to open the drawing, run the external rule to migrate, copy drawing resources including sketched symbols from a template, and update the title block and border.

    Please use plain text.
    *Expert Elite*
    Posts: 860
    Registered: ‎02-16-2006

    Re: iLogic help needed

    07-29-2012 01:25 PM in reply to: ryan.cotton

    I would have thought that Task scheduler should migrate all the drawings, you may have to run a rebuild or update.

    WikiHelp gives a specific migrate order http://wikihelp.autodesk.com/Inventor/enu/2013/Help/0000-Installa0/0192-Data_Mig192/0193-Data_Mig193...

    4.  If you migrate specific files, follow this migration order, since assemblies depend on parts, and drawings can depend on both parts and assemblies.
        Templates
        Styles
        Parts
        Standard parts
        Sub assemblies
        Assemblies
        Presentations
        Drawings

     

    If you are going to open the drawing to run a rule you may as well open a dozen drawings and use save all to migrate, it will tell you at each save that the file will be migrated and wait for you to ok.

    Once you have the batch migrated then you can run the drawing transfer wizard.

     

    I suppose ilogic could automatically accept the migrate warning and carry on, I don't know.

    I don't use ilogic so couldn't give you any help there but I assume that any code would be doing exactly the same as the wizard so would take as long.

     

    I still think the pre-programmed tools are our best option as they have been made for the job you want.

    Sorry I can't be any more help.

    Please use plain text.
    Mentor
    rhasell
    Posts: 201
    Registered: ‎05-23-2007

    Re: iLogic help needed

    07-29-2012 04:13 PM in reply to: harco

    Hi

     

    I cant help with everything, but with the template file, perhaps this might be of some help.

     

    I have a global template with a list of predefined title blocks and borders, I use iLogic to copy the selected title block to a vanilla idw. (Standard,idw) The ISO titlte block is empty to conserve file space. I have not set the code to copy symbols yet, that is still a manual process.

     

    ThisDrawing.ResourceFileName = "c:\data\templates\template.idw"
    ThisDrawing.KeepExtraResources = False
    
    Dim resu1t As String="Result"
    Dim T1TLE As New ArrayList
    T1TLE.Add("Eng - Fabritecture")
    T1TLE.Add("Eng - Greenline")
    T1TLE.Add("Eng - SPLASH")
    T1TLE.Add("Eng - UFS")
    T1TLE.Add("Shop - Fabritecture")
    T1TLE.Add("Shop - Greenline")
    T1TLE.Add("Shop - SPLASH")
    T1TLE.Add("Shop - UFS")
    T1TLE.Add("Shop - Fab - DWG Props")
    T1TLE.Add("Shop - UFS - DWG Props")
    
    resu1t=InputListBox("Select Drawing Title Block", T1TLE, resu1t, _
    Title := "Title Block", ListName := "Title Blocks from Template")
    
    'Set iProperties based on the selection.
    	If resu1t="Eng - Fabritecture" Then
    	ActiveSheet.TitleBlock = "ENG-FAB"
    	'End If
    	ElseIf resu1t="Eng - UFS" Then
    	ActiveSheet.TitleBlock = "ENG-UFS"
    	'End If
    	ElseIf resu1t="Shop - Fabritecture" Then
    	ActiveSheet.TitleBlock = "SHOP-FAB"
    	'End If
    	ElseIf resu1t="Shop - UFS" Then
    	ActiveSheet.TitleBlock = "SHOP-UFS"
    	
    	ElseIf resu1t="Shop - Fab - DWG Props" Then
    	ActiveSheet.TitleBlock = "SHOP-FAB-DWG"
    	'End If
    	ElseIf resu1t="Shop - UFS - DWG Props" Then
    	ActiveSheet.TitleBlock = "SHOP-UFS-DWG"
    	
    	ElseIf resu1t="Eng - SPLASH" Then
    	ActiveSheet.TitleBlock = "ENG-SPLASH"
    	'End If
    	ElseIf resu1t="Shop - SPLASH" Then
    	ActiveSheet.TitleBlock = "SHOP-SPLASH"
    	'End If
    	ElseIf resu1t="Eng - Greenline" Then
    	ActiveSheet.TitleBlock = "ENG-GREENLINE"
    	
    	ElseIf resu1t="Shop - Greenline" Then
    	ActiveSheet.TitleBlock = "SHOP-GREENLINE"
    End If
    
    'check for custom iprops and add them if not found
    Dim propertyName1 As String = "PROJ_NAME_1"
    Dim propertyName2 As String = "PROJ_NAME_2"
    Dim propertyName3 As String = "PROJ_NAME_3"
    
    customPropertySet = ThisDoc.Document.PropertySets.Item _
    ("Inventor User Defined Properties")
    
    Try
              prop = customPropertySet.Item(propertyName1)
              prop = customPropertySet.Item(propertyName2)
    	  prop = customPropertySet.Item(propertyName3)
    Catch
          ' Assume error means not found
              customPropertySet.Add("", propertyName1)
              customPropertySet.Add("", propertyName2)
    	  customPropertySet.Add("", propertyName3)
    End Try

     

    Other code for the border

     

    resu1t = MessageBox.Show("Do You wish to Insert a Border?", "Insert Border", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
    	If resu1t = "6" Then
    		ThisDrawing.ResourceFileName = "c:\data\templates\template.idw"
    		ThisDrawing.KeepExtraResources = False
    		ActiveSheet.Border = "GDI-Border"
    End If 

     


    Reg

    Autodesk Product Design Suite Premium 2014 Build 170
    Intel Core i7 (950@3.07GHz)
    Windows 7x64 (Home) - 12GB Ram
    Nvidia GeForce GTX 560 Ti (1Gig - Ver:314.07)
    Please use plain text.
    Member
    Posts: 5
    Registered: ‎03-13-2012

    Re: iLogic help needed

    07-29-2012 04:51 PM in reply to: rhasell

    That works awesome for the title block and border.  Do you know how to copy all sketched symbols from the template.idw?

    Please use plain text.
    Mentor
    rhasell
    Posts: 201
    Registered: ‎05-23-2007

    Re: iLogic help needed

    07-29-2012 05:03 PM in reply to: ryan.cotton

    Not at this stage, I still select all, then copy and paste to the new drawing.

     

    I only have two drawing templates, so managing symbols is not a problem, once the template is setup, I just keep all the symbols sychronised between the two (Manual Process of copy and paste)

     

    If I create a new symbol, I copy it to the template as well as the Standard.idw, The template file has some rarely used symbols which I use only when needed.

     

    The goal is to automate the symbol copy process as well, but I think it might take me longer to use iLogic as opposed to having them available all the time. (Perhaps a picture of each symbol on the iLogic form might be handy) Still to come though.


    Reg

    Autodesk Product Design Suite Premium 2014 Build 170
    Intel Core i7 (950@3.07GHz)
    Windows 7x64 (Home) - 12GB Ram
    Nvidia GeForce GTX 560 Ti (1Gig - Ver:314.07)
    Please use plain text.
    Member
    Posts: 5
    Registered: ‎03-13-2012

    Re: iLogic help needed

    07-29-2012 05:10 PM in reply to: rhasell

    Could it be done using the Inventor API?  Create a custom plug in?  I see the sketched symbols in the API object model, but I have no clue how to program that.

    Please use plain text.
    Mentor
    rhasell
    Posts: 201
    Registered: ‎05-23-2007

    Re: iLogic help needed

    07-29-2012 05:26 PM in reply to: ryan.cotton

    Not sure, way above my level of expertise, sorry.

     

    I am a noob with iLogic and VB. I have used the VB help to write some iLogic code, that works well.

    Curtis_Waguespack is an iLogic guru, he might have some advice.

     

     

    Reg

    Autodesk Product Design Suite Premium 2014 Build 170
    Intel Core i7 (950@3.07GHz)
    Windows 7x64 (Home) - 12GB Ram
    Nvidia GeForce GTX 560 Ti (1Gig - Ver:314.07)
    Please use plain text.
    Product Support
    Posts: 165
    Registered: ‎06-02-2010

    Re: iLogic help needed

    08-02-2012 02:23 AM in reply to: ryan.cotton

    Going back to your original question, consider the following:

    1. The best method for migrating your drawings is to use the Task Scheduler, not only does it migrate the files but you can also Rebuild all the parts and views, as well as get a logfile so you can check if any files failed the migration process.
    2. You talk about the Drawing Resource Transfer Wizard, you say it is slow and time consuming, but the question is; How often are you going to use it? It is purposly written to do exactly what you want and the UI is very intuitive.
    3. Finally you mention replacing the title block and borders. The above transfer utility is designed specifically to make that easy for you. You can transfer from one drawing to many, so in my eyes, it is ideal.

    Writing iLogic rules to do the same, but with less input, might seem a good idea, but what about all the time you spend writing the code and testing. Time that could be spent using the above tools.

    Jon.



    Jon Dean
    Support Specialist
    Product Support
    Autodesk, Inc.
    Please use plain text.