how do I generate table of Blocks, Page and Decription of a hierarchical design on a seperate page? Scout doens provide such capabilities afaik.
No idea, anyone?
We do our own, using automation.
Wow, cool for you. I guess your automation is company private only or is it possible to leverage from it?
It's rather specialized code, requiring certain frame properties and stuff, so it wouldn' be of much help to you.
But it really is not much, depending on how your project looks like.
If you have a flat design, you just get all frame symbols, get the property values you want (page number, page title), and put it onto the first sheet.
Do you have any experience at all with automation?
I could try a little ten liner or so demonstrating page/property access and putting text.
By the way, if you feel more comfortabe using .NET, with .NET 4 it's really easy yo use C# with Mentor too.
Lots of Greetings!
if you could make it, it would be a great entry in Automation for us.
This, I think, is the minimum of effort you need to put in in order to get a table of contents. You'll probably want to do more fancy stuff with alignment, fonts and colours. And you would probablywant it to create a menu entry and get loaded during the DxDesigner startup.
Also, we don't use hierarchical designs, so I have no idea how to traverse one. Much less, what to put into a table of contents for it.
Thirdly, it is much more fun doing this in .NET, with all that intellisense and much more powerful data structures. But this needs a lot of initial investment in terms of becoming a real pro with all the COM interop issues.It would definitely not be worth it if you only want two or three small extensions.
Anyway, here goes:
'Which symbol is a frame?
set Frame=New Regexp
' Design Name (we don't use hierarchical designs)
'What properties do I read?
'What's the sheet number of the contents sheet?
'Where do I put the text
'This will hold the table of contents data
'This function processes one sheet
for each Comp in ActiveView.Query(VDM_COMP,VD_ALL)
if Frame.Test(Comp.Symbolblock.getName(SHORT_NAME)) then
if (not (TitleAtt is Nothing or PageAtt is Nothing)) then
'We close all open sheets
if (Documents.Count>0) then
'Then we process each sheet,
for each Page in QueryPages(DesignName)
StatusBarText="Processing page " & Page.SheetNum
'create a list of formatted lines (trick: we use a .Net data structure
'which grows and can sort. You'll probably put more effort in this)
for each Key in Contents.Keys
'and lastly, write the toc
' first we delete the old stuff
for each Text in View.Query(4,0)
'and the nwe add the new lines
for each Line in LineList.ToArray()
You run it by saving it into a vbs file, opening the command line toolbar within DxDesigner and then typing "run c:\x.vbs".
It worked for me but it is very unlikely to work for you. :-(
But it should at least give you an idea of what's involved in doing an Extension for DxDesigner.
I need your help.
I'm not sure it still working with the last release.
The script create a new page in the Block section and then nothing.
The collection seems not working...
Thanks for your help
Retrieving data ...