SUDimensionGetText(SUDimensionRef dimension, SUStringRef* text)
I use this API to get text,why the text is “” sometimes ,but the dimension’s text is not empty
(1) What does “sometimes” mean?
(2) Can you add a model skp
file to your initial post that shows the problem?
(3) What version skp
file shows this issue?
(4) Indicate in the initial post what version of the C SDK you are using.
(5) Please post a reproducible code snippet to the initial post.
model.dwg (123.6 KB)
model.layout (336.6 KB
model.skp (324.1 KB)
these are skp,layout,dwg from the same model.
(1) What does “sometimes” mean?
some of these dimension’s text is empty by AIP “SUDimensionGetText(SUDimensionRef dimension, SUStringRef* text)”
(2) Can you add a model skp
file to your initial post that shows the problem?
the model file is above
(3) What version skp
file shows this issue?
I have only try sketchup pro2021,I export the skp to layout ,and use layout API to Get SUMODEL ,and use SUDimensionGetText to get text of dimension
(4) Indicate in the initial post what version of the C SDK you are using.
2023
SketchUp dimension objects are not the same as LayOut dimension objects. They are different and distinct from each other.
You need to use the SketchUp API to get dimensions within the SKP model, not the LayOut API.
I use LOSketchUpModelGetModel to get suModel first
Ah okay. We do not have an equivalent method for this function in the Ruby API.
How are the dimensions created?