Hello.
Is it possible to use rapid dimension via API in drawing?
I want to make bottom rapid dimension when two vertexes are selected, not to tell the function the dimension insertion point, but let SolidWords decide where to insert dimension with it's rapid dimension tool.
SolidworksApi/macros
Yes it's possible. Take a look at:
2018 SOLIDWORKS API Help - AddDimension Method (IModelDocExtension)
with options:
2018 SOLIDWORKS API Help - swSmartDimensionDirection_e Enumeration
I wish you could but unfortunately its not possible. I would love it if someone could prove me wrong.
Workarounds:
1. I use IDrawingDoc.InsertModelAnnotations3 and then delete the dimensions you don't want from the array that is returned. It is tedious.
2. Calculate where the dimension ought to go based on the view extents or the model geometry itself. This can be even more tedious than the first option.
3. Maybe try to programmatically select the dimension tool then select the entities? Never tried this.
Keith
SOLIDWORKS API and PDM API Training and Services
Yeah, I have tried it with (0,0,0) coordinates and it does nothing.
If you need to know coordinates of text it is not like rapid dimension.
that needs exact co-ordinates. Don't see it much useful.