Find objects of Type Ink

G

Gary

How do I determine if an object is Type Ink?

I wish to find all abjects of Type Ink and Change the Ink Width. I have
some code that loops through and find all objects.

How would I also determine the x-y location of an object in inches or twips???

Will this work??
Set shp = AppVisio.Application.ActivePage.Shapes("Sheet.4")
If shp.Cells("PinX").Formula > 1.25 Then


I am trying to determine some objects and rename them.

Thanks,

Gary
 
J

John

Hi Gary,

Would this work? I hope I've understood what you're after........

Dim lPinX As Long
Dim lPinY As Long

lPinX = shp.Cells("PinX").Result(visInches)
lPinY = shp.Cells("PinY").Result(visInches)

Also if you're looping through the shapes then for each loop you have a
reference to the shape so the code below would work as well (although there
may be a good reason why you're referencing by name (shape.ID)):

Sub FindInkShapes()

Dim pag As Visio.Page
Dim shp As Visio.Shape
Dim lPinX As Long
Dim lPinY As Long

For Each pag In AppVisio.Application.Pages
For Each shp In pag.Shapes
If shp.Type = visTypeInk Then
lPinX = shp.Cells("PinX").Result(visInches)
lPinY = shp.Cells("PinY").Result(visInches)
'PLUS YOUR WIDTH CODE
End If
Next shp
Next pag

End Sub

Anyway, hope that helps.

Best regards

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top