Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic documentation?

6 REPLIES 6
Reply
Message 1 of 7
gerhick
1094 Views, 6 Replies

iLogic documentation?

Hi all,

 

I'm looking to write a few simple little macros to look after simple drawing updates (replace borders & title blocks, move sketched symbols etc), so I'm looking for some good reference material to help me around the API... I can write the code in VBA easy enough, but it doesn't seem to translate to iLogic all that well. For example, DrawingDocument.BorderDefinitions.Copyto exists in VBA, but doesn't appear to exist in iLogic. Where can I find out what does and doesn't exist in iLogic?

 

I was hoping to use iLogic, as an exercise in learning something new, otherwise I might end up going back to VBA.

 

Any help would be greatly appreciated.

___________________________________________
Gerrard Hickson
Inventor CAD Administrator || Autodesk Inventor 2012 Certified Professional
Autodesk AutoCAD 2012 Certified Professional|| Bachelor of Technology (Mechanical)

PointZero Design and Drafting
6 REPLIES 6
Message 2 of 7
jeff.pek
in reply to: gerhick

Hi -

 

The iLogic functions, etc. are documented as part of the Inventor help.

There are "functions", such as ThisDoc, which can serve as a bridge to the regular Inventor API.

 

Jeff

Message 3 of 7
gerhick
in reply to: jeff.pek

Hi Jeff,

 

I found the help files you mention, and it seems there's more to it then I first realised. I had just been looking in the wrong location.

 

Having said that, I'm trying to update our titleblocks and borders on older drawings with those on our current drawing template. I've figured out how to add a NEW title block (one with a different name). However, I can't figure out how to replace a title block of the same name. Can I rename the existing  one, then add the new one? If so, how do I rename and delete a title block?

 

Thanks and Regards

___________________________________________
Gerrard Hickson
Inventor CAD Administrator || Autodesk Inventor 2012 Certified Professional
Autodesk AutoCAD 2012 Certified Professional|| Bachelor of Technology (Mechanical)

PointZero Design and Drafting
Message 4 of 7
MjDeck
in reply to: gerhick

Gerrard,

 If you want to update your older drawings automatically, I would recommend doing it with a VBA or VB.NET program.  iLogic could do it, but it won't really give you any advantage.  The main use of iLogic is to add rules to documents, and have these rules run on parameter changes or other events.  What you're doing sounds like a one-time (or occasional) operation.

 If you want more info on replacing title blocks, I would recommend creating a new post specifically on that subject.

 I think you might have to delete the existing title block and definition, copy the new definition in, and then re-create the title block.

 


Mike Deck
Software Developer
Autodesk, Inc.

Message 5 of 7
MjDeck
in reply to: gerhick

Gerrard,

 Have you tried the Drawing Resource Transfer Wizard?  If might do what you want.  If it does, then you don't need a custom program.


Mike Deck
Software Developer
Autodesk, Inc.

Message 6 of 7
gerhick
in reply to: MjDeck

MjDeck,

 

Thanks for the reply, Updating the title block was just an example (perhaps not the best) to demonstrate the kind of thing we'd like to achieve. iLogic may not be the best option for these tasks, of that I'm aware. The plan is to assess iLogic, and determine whether there's any advantages (i.e. simplicity) to using iLogic over VBA or VB.NET...

 

All I'm looking for is a good reference source I can read through to check out the capabilities.

 

Good point though regarding the iLogic remaining local in a document. Not much point writing code to update title blocks, if you have to add that code into old drawings. I think VBA/.NET wins on that one...

 

Drawing Resource Transfer Wizard looks good, but it's not consistent with our work flow... We need our title blocks to be updated at a particular point in our drawings life cycle.

 

Cheers

___________________________________________
Gerrard Hickson
Inventor CAD Administrator || Autodesk Inventor 2012 Certified Professional
Autodesk AutoCAD 2012 Certified Professional|| Bachelor of Technology (Mechanical)

PointZero Design and Drafting
Message 7 of 7
CadUser46
in reply to: gerhick

Gerhick, i recently wrote some code that does what you are trying to do in VBA.  Im not at my machine just now but could paste the code once im back at work if you'd be interested?

 


Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

---------------------------------------------------------------------------------------------------------------------------
Inventor 2010 Certified Professional
Currently using 2023 Pro

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report