.NET

Reply
New Member
qak06
Posts: 2
Registered: ‎05-02-2014
Message 1 of 3 (119 Views)
Accepted Solution

Only change the properties of newer objects

119 Views, 2 Replies
05-02-2014 10:16 AM

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

ADN Support Specialist
Balaji_Ram
Posts: 668
Registered: ‎03-21-2011
Message 2 of 3 (94 Views)

Re: Only change the properties of newer objects

05-06-2014 11:10 PM 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

New Member
qak06
Posts: 2
Registered: ‎05-02-2014
Message 3 of 3 (78 Views)

Re: Only change the properties of newer objects

05-09-2014 10:20 AM in reply to: Balaji_Ram

Thank you Balaji,

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

Regards

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community