Quantcast
Channel: Mentor Graphics Communities: Message List
Viewing all articles
Browse latest Browse all 4541

Re: Script under EE7.9.5

$
0
0

Though I have not tested it specifically with 7.9.5, the following script works fine in both 7.9.4 and VX:

 

Sub Cmd_testClick(sender AsObject, e As EventArgs)

         Dim list AsNew ArrayList

         Dim block As ViewDraw.Block

         Dim comp As ViewDraw.Component

         Dim tmp AsString

         Dim x, y AsLong

        

         list.Clear

         list.Add("1st line")

         list.Add("2nd line")

         list.Add("3rd line")

         list.Add("4th line")

        

         view = app.ActiveView

         comps = view.Query(128, 1)

        

         ForEach comp In comps

             x = comp.GetLocation.X

             y = comp.GetLocation.Y

            

             block = comp.SymbolBlock

            

             ForEach tmp In list

                 block.AddText(tmp, x, y)

                 y = y - 10

             Next

         Next

     EndSub

The only thing I can see in your code that causes an error for me is the lack of parentheses in the AddText command.  That may not matter if you are using vbscript or the EFM scripting, but it does in vb.net.

 

I hope this helps you. 


Viewing all articles
Browse latest Browse all 4541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>