iLogic form turning a Flat Pattern ON and OFF

iLogic form turning a Flat Pattern ON and OFF

Boggle88
Enthusiast Enthusiast
693 Views
5 Replies
Message 1 of 6

iLogic form turning a Flat Pattern ON and OFF

Boggle88
Enthusiast
Enthusiast

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 

0 Likes
694 Views
5 Replies
Replies (5)
Message 2 of 6

JamieVJohnson2
Collaborator
Collaborator

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

Jamie Johnson : Owner / Sisu Lissom, LLC https://sisulissom.com/
0 Likes
Message 3 of 6

Anonymous
Not applicable

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. 

0 Likes
Message 4 of 6

Boggle88
Enthusiast
Enthusiast
Hi Jamie and Resto,

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

0 Likes
Message 5 of 6

Anonymous
Not applicable

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

 

0 Likes
Message 6 of 6

Boggle88
Enthusiast
Enthusiast
Thanks RAS for reply.

Will give that ago hopefully this will work.

Thanks again.
0 Likes