- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
iLogic form turning a Flat Pattern ON and OFF
Hi there,
I'm after a little bit of help please.
We have created a standard 'Steel Plate' using an ipt and iLogic form.
We have added a flat pattern to steel plate and have managed to get the flat pattern to delete when selecting no to laser part on our iLogic form but can not get the flat pattern to turn back on when selecting yes on our iLogic form.
Is there some simply iLogic code out there to be able to turn the feature back on when selecting 'Yes' on form.
Please see attached screenshots of our iLogic form and features in part for clarification.
Any help would be appreciated.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Since a flat pattern is 'generated' its not a simple matter to delete then turn around. Deleting the pattern, or creating the pattern, mess with the object ID's and therefor any drawing that may be using that part. HOWEVER... wrap your delete into a transaction, finish the transaction. Then if you want it back, Undo the transaction.
Dim trans As Inventor.Transaction = invApp.TransactionManager.StartTransaction(PartModel, "Delete Flat Pattern")
or something like that. with code for deleting, then
trans.end
invApp.TransactionManager.UndoTransaction
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Could you make the flatpattern always and make custom property that tells if the part is laser part or not? I guess you have some kind of export ilogic rule for laser parts flat patterns and you could use that custom property to check if export should be made.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Thanks for your replies.
Jamie - Thanks for reply, will give this a try.and let you know how we get on.
Risto - Yes we have steel plate already set up with flat pattern in so that when all plates are in main model we can run a macro to create all dxf files that need laser profiling but unfortunately this may change depending on the nature of the job. We definitely need to option to be able to go back and put flat pattern on through iLogic preferably would be best to accommodate user interface with our employees.
Thanks for your time
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I mean that you don't have to delete the existing flat pattern if you control the dxf export with custom property. I think it will not do any harm if flat pattern exists even if it's not used. We actually have similar work flow and we use custom property to control the dxf export.
So your macro could work like this:
select "yes" in laser part option: create flat pattern(if not exist) and create/write "yes"-value to custom property
select "no": create/write "no"-value to custom property and do nothing for flat pattern