Hello,
I need to use static AssemblyFileName because the generated drawings need to refer always to the same model. Otherwise the Annotations will get lost as soon as I change something in the Assemblies Parameters. I can not simply generate a new drawing as the drawing gets additional information like title block and text. So I need to stick with the drawing made at the first place and this drawing needs to follow changes of the assembly.
If I use static AssemblyFileNames without signature ETO does not re-render the Assemblies as required. The assemblies and some of its parts stay as they were before the parameter change. The ETO model is correct but the parts and models used are the old ones.
How do I manage to get the assembly with all its children refreshed always I change some parameters ( the configuration of the assembly )
AssemblyFileName = "Base.iam" DisableMemberPartEditing? = False AutosaveChanges? = True render? = True
This is what I try so far .
Please if anyone knows what to do, please support.
Regards
Timo
Solved! Go to Solution.
Solved by TIMOHART. Go to Solution.
Solved by Lesoux. Go to Solution.
Try this way.
Make a mixin based on IvAssemblyDocument (kind of MixinAsm). See below.
Design MixinAsm: ... IvAssemblyDocument
Parameter Rule asmIndex As Integer = NoValue
Rule signatureRequired? As Boolean = True
Rule asmName As String = makeString(designName)
Rule asmType As String = "ASM"
<%%Category("Inventor Internal")> _
Rule %%sharedAssemblyFileName As String
Select(signatureRequired?)
Case True
If asmIndex= NoValue Then
Return asmName + "." + asmType + "." + %%signature + ".iam"
Else
Return asmName + "_" + stringValue(asmIndex) + "." + asmType + "." + %%signature + ".iam"
End If
Case False
If asmIndex = NoValue Then
Return asmName + "." + asmType + ".iam"
Else
Return asmName + "_" + stringValue(asmIndex) + "." + asmType + ".iam"
End If
End Select
End Rule
<%%Category("Inventor")> _
Parameter Rule AssemblyFileName As String = %%sharedAssemblyFileName
End Design
Use this mixin to create your assembly.
#1
Design yourDesign : ... MixinAsm
Rule signatureRequired? As Boolean = False
Rule asmName As String = "YOUR NAME"
End Design
#2
Design yourDesign : ... MixinAsm
<%%Category("Inventor Internal") > _
Rule %%sharedAssemblyFileName As String = "YOUR NAME.iam"
End Design
Using way #1 or #2 depens on situation.
I have these properties (see below)
EnablePartEditing? = False ' should be False -> if True, spends more time to generate 3D model. AutoSaveChanges? = True
render = True ' haven't to be changed.
Thank you Lesoux for the coding.
I added this to my small dataset to show the problem.
1. If you choose to have P1 or P2 they will never disappear again.
2. Dimensions will get lost if I do not use the specific Assembly name.
3. If I add manual dimesions they will also get lost
Hope you will get along with the sample .
Thank you for your support .
Regards
Timo
Hi TIMOHART,
Seems like I have fixed all issues. Don't be afraid!!! I add a lot new designs.
Before you will start test it you need make some modifications in you drawing template (Intent doesn't like spaces). Code inside based on changes below.
-> means 'to'
A4-Größe, Hochformat, 1 Ansicht -> A4-Größe_Hochformat_Ansicht(1)
A4-Größe, Querformat, 1 Ansicht -> A4-Größe_Querformat_Ansicht(1)
A3-Größe, 2 Ansichten -> A3-Größe_Ansichten(2)
A2-Größe, 4 Ansichten -> A2-Größe_Ansichten(4)
A1-Größe, 6 Ansichten -> A1-Größe_Ansichten(6)
A0-Größe, 7 Ansichten -> A0-Größe_Ansichten(7)
Rahmen Sulzer SPDE PGB -> Rahmen_Sulzer_SPDE_PGB
SULZER English -> SULZER_English
Sulzer SPDE -> Sulzer_SPDE
Sulzer SPDE PGB -> Sulzer_SPDE_PGB
I couldn't do that because I have ETO 2015. If I would save it you wouldn't open it.
Let me know about result. Good luck 🙂
Hello Lesoux ,
I must admit I am a bit afraid .. .
Actually we might talk about different things. The functionality is still not the one I expect and the problem is not solved yet.
Thank you very much for the coding I will need at least one week to find my way through. I added a small video to this post to
show you the ultimate cause the ultimate problem I need to solve. I would also like to ask to keep the coding simple but I do not
want to edit your testing case now you put so much effort in it . Thank you for the hint with the template we acctually have quite
some trouble with it.
Hope the video will get us in the right direction as I can not always delete the memberfiles.
Thank you / Regards
Timo
Hello Lesoux,
I wonder if I should write something like this to solve the problem :
Uncached Rule deleteIAM As Integer Dim Members_Dateipfad As String = ProjectLocation() + "\Template\Delete_iam.bat" CreateProcess( """" + Members_Dateipfad + """" ,Wait? := True) End Rule
having the BATCH like this :
@ECHO OFF del "..\Member Files\*.iam"
Unfortunatly I have no Idea how to delete the member files on the occation of any parameter change. Might this be looking in the right direction ?
Please if you don't mind delete all the coding used for saving the assemblies and parts somewhere else than the standard folders. We will definatly not use this. We like the memberfiles and the children in the standard memberfiles folder and also the drawing should be within the projectlocation.
Thank you / Regards
Timo
Hi TIMOHART,
I know this issue, I have the same problem. As I know, this is the problem of ETO itself. System can add whatever you want to generated model and drawing, but can't delete anything. There is no any solution about it yet. I'm still working with Autodesk on that.
We decided to run everything from scratch (model and drawings).
About folders. I just showed some way how to move forward. If you don't like it, that is OK. I think that is much comfortable to have special folder with all parts, assemblies and drawings. Up to you.
I have commented rules to get default settings (see attached files).
Hello Lesoux,
Thank you for letting me know that this is a known issue. Is it of any help to make a ADN case of this topic - can I expect a solution
within the next couple of months to our specific problem. In case we will not find a solution we are probably bound to have our internal
processes not working as we planed at the time we started with ETO.
Thanks a Lot
Regards
Timo
PS: I will defininatly make a ADN case due to the importance for us. 🙂
Hi TIMOHART,
I don't really know how many time it will take. Don't need to jump to conclusions. I'm working on much complex project and I have much more problems because ETO doesn't support a lot features. However, we try to go arount and find any solution, even temporary to move forward. Right now you have a good point to create ADN case to accelerate resolving this issue. I hope it will happen soon.
I have a lot decisions about workaround some issues (a lot uses with API coding). Just let me know, I'll try to help you.
Best regards.
Hello Lesoux,
I added a case to ADN but I only got the information that the parameter AssemblyFileName produces a static part which is not intented to react on Parameters anymore. This is a strange answer and I already transmitted that I am not satisfied. In any case I droped the plan to delete the memberfiles automatically, cause it will not help. I would also need to close and open the upper assembly then automatically .
What I need to find is a update function , method or my own Assembly Document Design which should work on basis of the theoretical signature.
something like
updateAssembly("myAssembly") = true
Function Method or Design UpdateAssembly (Filename as String )
' check if Assembly has / requires another signature ( Maybe get signature from iproperties ???? )
' update assembly ( Re-Render ) due to parameter Change
' save assembly with static name --> AssemblyFileName = "myAssembly"
' maybe write signature in Properties
end function Method or Design
Hello Lesoux,
Attached model#2 is now working. By Setting %%shared? to false it updated the assembly.
Regards
Timo
Hi, Timo.
I have started to play with your proposition, the "flight" is normal yet. I'll let you know about results.
This is Great. I want to send or attach a new video I made from my project.
Can you send me PN for sending you this video ?
To attache the 5Part Zip File here is not possible .
Thank you / Regards
Timo
Hello,
I found a sollution:
Rule AssemblyfileName = Me.DisplayName + ".iam"
Rule SharingBehavior = :Custom
within the assembly mixing and removed all workpoints programmed with coordinates within the assembly.
Then everything works fine.
Regards
Timo