Main Menu

Recent posts

#71
Shapes & Templates / Re: Visio Stencil Data Fields ...
Last post by wapperdude - April 09, 2024, 01:14:41 AM
You may want to go to this link to get a discussion about DataGraphics:  https://learn.microsoft.com/en-us/office/vba/visio/Concepts/about-displaying-data-graphically-visio

Basically, as I recall, the DataGraphics Can be linked to individual subshapes.  That should solve formating problems.  But, if subshape is deleted, then that link is broken. 

However, if DataGraphics are, indeed, applied to the toplevel shape, then make them not visible.   That way, the "global" formatting goes unnoticed.  Easiest way is to select the group text and delete it. Then, each data entry, e.g., Prop._VisDM_F1, is field inserted into the desired subshape.  Since the subshape owns the visibility, formatting is local to the subshape...such as position, justification, font, text color, etc.  Your shape is not setup that way.

#72
Shapes & Templates / Re: Visio Stencil Data Fields ...
Last post by wapperdude - April 09, 2024, 12:36:05 AM
The issue is how the datagraphics are applied.  They belong to the Group toplevel.  So, when you make a change, it effectively changes all of the datagraphics as thehy are members of a single shape.

That's about as far as I've gotten with this for now.  But, I did replicate everything going to group center.
#73
Shapes & Templates / Re: Visio Stencil Data Fields ...
Last post by Brason - April 08, 2024, 08:57:54 PM
Ah well that's good to know! Thanks.

Currently what I do when I want to modify the shape is I click the data I want to include in the shape, in this case I want whats in F5. I do as follows:

-I click the check box for F5 and at that point it scrambles the existing shapes with data attached to them.
-If the data has not been used I then I right click the shape and select edit graphic data.
-I then format the item how I want through Edit Item. Typically heading 2 with 8 pt font size.
-I then layout the shape how I want by right clicking the shape and selecting Group>Open Group and making adjustments there.
-Lastly I pull that shape into my stencil drawer so I can just click the stencil and drag from data sheet so it all auto populates the proper values.You cannot view this attachment.
#74
Programming & Code / Re: Communication Between Mult...
Last post by Nikolay - April 08, 2024, 08:36:06 PM
I think here is the confusion.

If you are using the "second method", you are not actually calling the second Add-In, instead you are adding the CODE of the second add-in into your first Add-in (as a library reference) and calling it "locally".

I.e. in this case, you don't really need the "second" add-in, you can just uninstall it.

For me, when I set a breakpoing on this line:
Globals.ThisAddIn.Application.COMAddIns("VisioAddin1").Object.SayHello("World")And then use "Step Into" (F10 or F11), the debugger steps into the second add-in.
I've tried with the sample solution on github.

BTW, in your case maybe it could be more natural to simply copy the content (files) from the second add-in to your first add-in, and make it just one add-in instead? Or make sort of a "library" out of the second add-in you call, and then reference that library.
#75
Programming & Code / Re: Communication Between Mult...
Last post by perry59 - April 08, 2024, 07:35:58 PM
stepping into the first addin is no problem, I can set a breakpoint at the button click as you said. But when I get to this call
Globals.ThisAddIn.Application.COMAddIns("VisioAddin1").Object.SayHello("World")
it stops there, using the other method of invocation

Dim junk As visioTables.ClassVBA
 junk = New visioTables.ClassVBA

 If Not junk Is Nothing Then
   junk.test()
End If
I CAN step into the second addin but something is not right as it stops executing once inside the second addin
#76
Shapes & Templates / Re: Visio Stencil Data Fields ...
Last post by wapperdude - April 08, 2024, 06:35:19 PM
First, proper terminology is shape, not stencil.  A stencil is a special Visio file that contains master shapes, typically 1 or many.  What you're editing is the shape that is in the stencil.

So, can you explain the process that you're doing to modify the shape?
#77
Shapes & Templates / Re: Visio Stencil Data Fields ...
Last post by Brason - April 08, 2024, 05:29:01 PM
Here's the stencil in question.
#78
Shapes & Templates / Visio Stencil Data Fields Cent...
Last post by Brason - April 08, 2024, 05:27:50 PM
I have a number of stencils that I used for making drawings for submittals for my work. I'm fairly new to Visio but I've modified some existing ones that my co-worker had previously made but everytime I attempt to add a new data field all the existing data fields go to the centre of the stencil and resets my text formatting to defaults. I've attached the before and after of what is happening.

Thanks in advance for any advice!!
#79
Shapes & Templates / Re: Master inside a Master
Last post by wapperdude - April 08, 2024, 02:49:32 PM
Can you upload examples...showing old shape, new shape so that we can see what your implementation and updating process looks like? 

Also, you didn't indicate if using macros (code) is allowed.
#80
Shapes & Templates / Re: Master inside a Master
Last post by Surrogate - April 08, 2024, 07:00:10 AM
Quote from: Dazling on April 08, 2024, 05:55:30 AMto keep backward compatibility for older version I then go and update the 50 or so other devices i have already made, which is time consuming. 
which changes into sub-shapes do you mean?