.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Only change the properties of newer objects

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
qak06
354 Views, 2 Replies

Only change the properties of newer objects

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

2 REPLIES 2
Message 2 of 3
Balaji_Ram
in reply to: qak06

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

 

 

 

 

 



Balaji
Developer Technical Services
Autodesk Developer Network

Message 3 of 3
qak06
in reply to: Balaji_Ram

Thank you Balaji,

I solved the problem using your suggestions and fixing a mistake i made.

Regards

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost