-
1. Re: AfterAddComponent Event is not called!
peter_festesen Jul 12, 2018 2:11 AM (in response to juergen.hinterleitner)Hi Jürgen
This used to work - I found an old script (attached here) that we used to trig the 'pdbslot' command after DxDatabook based instantiation.
I am a bit busy just now - vacation starts tomorrow ;-)
Can you please give it a spin (If I remember correctly, we entered the path to the script via the DxDatabook dbc file), and let us know the outcome ?The only difference I see is that we used (we don't use this script anymore, by the way) is that we used a function
Function Application_AfterAddComponent(component)
...
...
...
End Function
/P
-
DxDB.vbs.zip 558 bytes
-
-
2. Re: AfterAddComponent Event is not called!
peter_festesen Jul 12, 2018 2:23 AM (in response to peter_festesen) -
3. Re: AfterAddComponent Event is not called!
juergen.hinterleitner Jul 12, 2018 4:22 AM (in response to peter_festesen)Hi Peter.
I could do the following experience now...
- If I load the Testfile by the DBC configuration as you do, then the following Event will be called:
(I see after placing part the "Debug B" message)
- But If I load it per scripts.ini. then I just get the "Debug A" message, but the "Event" never will be called !!!
- If I load the Testfile by the DBC configuration as you do, then the following Event will be called:
-
4. Re: AfterAddComponent Event is not called!
peter_festesen Jul 12, 2018 7:33 AM (in response to juergen.hinterleitner)It seems that that makes sense - the only reference I can find regarding AfterAddComponent , is in an older version of the DxDatabook User's Guide on Support Center. To me it clearly indicates that this is an event belonging to the DxDatabook Addin, not to Designer.
The Designer Automation Manual does list this event (VX.2.3) in the Scripting with DxDatabook section. -
5. Re: AfterAddComponent Event is not called!
peter_festesen Jul 12, 2018 7:35 AM (in response to peter_festesen)Update - The Designer Automation manual for several releases (including VX.2.3, Chapter 6) do actually show up on a Support Center search - I must have made a mistake earlier.
/Peter
-
6. Re: AfterAddComponent Event is not called!
juergen.hinterleitner Jul 12, 2018 11:28 PM (in response to juergen.hinterleitner)Okay. But it's bad that the Designer here distinguish between Designer and Databook (at the Level of loading files).
Disadvantage:
- It's not possible to do something inside the script, in combination with other Events, like "Application_ProjectClosed". Because you cannot use/load both in one file!!!
- You cannot use controlled loadings per scripts.ini, based on wdir-company splittings etc. You are only able to load Event-Scripts with "Add or AfterAddComponent" Events, within the Databook-dbc-files! for me... not suitable to handle.
- While you can use in the "scripts.ini" dynamic paths ("%COMPANY_PATH_SYSVAR%\myscript.vbs"), you are not be able to use dynamics in the dbc-configuration-script load!
-
7. Re: AfterAddComponent Event is not called!
phiet Jul 16, 2018 5:45 AM (in response to juergen.hinterleitner)You may want to try this instead
Sub Application_CreateObject(ByVal ReasonFlag, ByVal ObjectType, ByVal Block, ByVal Object)
If ObjectType = VDTS_COMPONENT Then
we used this to add some extra property to the component everytime user pull a new component from databook.
-
8. Re: AfterAddComponent Event is not called!
Patrick.Cashman Jul 25, 2018 12:10 PM (in response to juergen.hinterleitner)Another way to get around this is to write information to a text file in the design with the dxdatabook script when the event fires, then read it with a script running in DxDesigner. It's a clumsy and inelegant way to do it, but can work.
It would be nice if dxdatabook were fully integrated in DxDesigner.