Hello everybody,
this is a short part of my routine.
I am giving some values to olcek and i want the lines have that much of linetypescale.
But if there are other objects with different linetypes. All of them is having same linetypescale.
My problem is: How can i change the linetypes or dimscales of the only objects i newly added to the drawing. I want existing objects before i add new ones have the old values they already have.
For Each nesne As DatabaseServices.ObjectId In secim.Value.GetObjectIds
If nesne.ObjectClass.Name = "AcDbLine" Then
cizgi = nesne.GetObject(OpenMode.ForWrite, True, True)
cizgi.LinetypeScale = olcek ' ok
Else
End If
If nesne.ObjectClass.Name = "AcDbAlignedDimension" Or nesne.ObjectClass.Name = "AcDbDimension" Or nesne.ObjectClass.Name = "AcDbRotatedDimension" Or nesne.ObjectClass.Name = "AcDb2LineAngularDimension" Or nesne.ObjectClass.Name = "AcDbRadialDimension" Then
dim1 = nesne.GetObject(OpenMode.ForWrite, True, True)
dim1.LinetypeScale = olcek
dim1.Dimscale = olcek
End If
'....
Next
Any help please
Regards
Quak06
Solved! Go to Solution.
Solved by Balaji_Ram. Go to Solution.
Hello,
You can try modifying the "CELTSCALE" before creating the line which should help control the linetype scale relative to LTSCALE value already set.
or if you can use an "Database.ObjectAppended" event handler to track the ObjectId of the newly created entities and use them to
change their linetype scale at a later time.
Regards,
Balaji
Thank you Balaji,
I solved the problem using your suggestions and fixing a mistake i made.
Regards