Message 1 of 8
Create new textstyle if one doesn't exist
Not applicable
01-25-2017
07:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've learned how to create MText through VBA and utilize an existing Font Style, is it possible to have VBA check if a Font Style exists in the dwg? If so, it would continue the macro, if not then it would create a specified style. I can't find anything online about this other than directly changing an object's style upon creation, not about creating a style from scratch if the style doesn't exist.
'CHECKED BY DATE
Set MTextObj4 = ThisDrawing.ModelSpace.AddMText(corner4, widthN, text4)
With MTextObj4
.AttachmentPoint = acAttachmentPointMiddleLeft
.InsertionPoint = corner4
.StyleName = StyleName
.Height = height1
End With... where StyleName = "PDF Search", the existing style.