×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

edit text field in shape from code.

edit text field in shape from code.

edit text field in shape from code.

(OP)
Hello Everyone, I Have spent days trying to get this to work with no luck, I must be missing somthing very basic, and just cant figure it out on my own.

I have a little vb.net program I wrote, that takes a list of parts from a database, and for each part, gets a file name and opens that drawing and prints it.

works fine. the next step is to have the program put a header on the drawing with the "Lot Number" "Part Number" "QTY" etc.

so I have created a stencil, a MasterShape, and my program can drop this shape onto the drawing. the problem is getting a text fields to work is my problem.

I can edit this master (from the stencil) and create a few text boxes it seems I can create custom properites for Each text box seperatly (then insert a field in the text box), but not reference the master shape's properties. the scope is seperate on every item on the page.


How should I be going about this?

I really want to have a shape I can dump on my drawing in code and set the properties, print the drawing, and go to the next

the end resule in psydo code would be:

vshape.lotnumber = "1234"
vshape.qty ="100"

so can I create a master that has a set of properites, then draw some text boxes and assoiciate the boxes values to those properties, and then access them from code?

Thank you very much!

-John

RE: edit text field in shape from code.

You can do something like
Dim stencil As Visio.Document
Dim mstCircle As Visio.Master
Dim shpObj as Visio.Shape
Set stencil = ThisDocument.Application.Documents.Open("Blocks Raised.vss")
Set mstCircle = stencil.Masters("Circle")
shpObj = ActivePage.Drop(mstCircle, 4, 5)
shpObj.Cells("Prop.FirstCustomProperty.Value") = 4
End Sub

John...   Visio MVP - Visio.MVPs.org

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close