A few questions/problems I’m having:
-
I would like to change the scale of a dimension object (arrows, text etc. all should grow). I’m not seeing an option for this. I do see something for text height, but it doesn’t seem to work for me when I use it as follows:
MyDimension.TextHeight = 50
doc.Objects.AddDimension(MyDimension)
-
I would like to change a line type to something other than continuous. I’ve tried the code below and it doesn’t seem to work
Dim attributes = New Rhino.DocObjects.ObjectAttributes()
attributes.LinetypeIndex = 4
attributes.LinetypeSource = Rhino.DocObjects.ObjectLinetypeSource.LinetypeFromObject
MyLineID = doc.Objects.AddLine(MyLine, attributes)
-
I would like a locked object to not be the generic grey locked color, but rather a color of my choice. Is there a way to do this short of putting it on a layer and locking the layer?
Thanks,
Sam
Can only help you with question 2 and half with question 3.
Just tried this:
Dim attributes = New Rhino.DocObjects.ObjectAttributes()
attributes.LinetypeSource = DocObjects.ObjectLinetypeSource.LinetypeFromObject
attributes.LinetypeIndex = 4
doc.Objects.AddLine(pt0, pt1, attributes)
and it worked. I’ve changed LinetypeSource and LineTypeIndex. so it first get the settings from the linetypeobject then sets the linetypeindex. Though. number 4 is hard to see. It are very small dots xD
For question 3. I know you can change the locked color too another color:
But i dont know if you can just keep the color of the objects.
Hi Jordy,
This is odd, I tried your code and the resulting line is still continuous line type… I’m wondering if there is some setting that is causing problems.
Good point about changing all locked objects colors, but I unfortunately do need to change it for just one locked object, not the others…
Thanks,
Sam
What is your SetLinetypeScale? Mine is 1 maybe yours is different?
Mine LinetypeScale is 1, but it’s not that because in the properties bar it still says my line type is continuous…
I’m still having problems with all three original questions, and a 4th now too, so I’ll summarize them all again here:
- I would like to change the scale of a dimension object (arrows, text etc. all should grow). I’m not seeing an option for this. I do see something for text height, but it doesn’t seem to work for me when I use it as follows:
MyDimension.TextHeight = 50
doc.Objects.AddDimension(MyDimension)
also tried this now:
doc.DimStyles.CurrentDimensionStyle.TextHeight = 30
doc.DimStyles.CurrentDimensionStyle.CommitChanges()
-
I would like to change a line type to something other than continuous. I’ve tried the code below that seems to work for Jordy, but it doesn’t change linetype for me…
Dim attributes = New Rhino.DocObjects.ObjectAttributes()
attributes.LinetypeSource = DocObjects.ObjectLinetypeSource.LinetypeFromObject
attributes.LinetypeIndex = 4
doc.Objects.AddLine(pt0, pt1, attributes)
-
I would like a locked object to not be the generic grey locked color. As Jordy explains, I could change the generic locked color, but what I need is to change it for specific objects, but not all. Is there a way to do this short of putting it on a layer and locking the layer?
-
When using angular dimensions, sometimes the dimension arrows are forced outside the angle, is there a way to force them inside the angle?
Thanks,
Sam