Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic: How to set DrawingCurve.Color to "ByLayer"

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
j.pavlicek
712 Views, 2 Replies

iLogic: How to set DrawingCurve.Color to "ByLayer"

Hello,
how to change DrawingCurve.Color (back) to "ByLayer" with iLogic?

Dim oBlue As Color
oBlue = ThisApplication.TransientObjects.CreateColor(0, 0, 255) 'blue
Dim oCurve As DrawingCurve
oCurve.Color = oBlue 'Set Drawing Curve Color to blue

oCurve.Color = ??? ' Set (back) to ByLayer

Thanks for help.



Inventor 2022, Windows 10 Pro
Sorry for bad English.
Labels (3)
2 REPLIES 2
Message 2 of 3
JhoelForshav
in reply to: j.pavlicek

Message 3 of 3
j.pavlicek
in reply to: JhoelForshav

For completion:

There is Color.ColorSourceType Property which sets source of the color (as I understand it) when no-color is set.

	Dim oCurve As DrawingCurve
	oCurve.Color = Nothing
	Logger.Debug(oCurve.Color.ColorSourceType.ToString) 'Returns kLayerSource, because this is a default setting for my document
	oCurve.Color.ColorSourceType = kLayerColorSource 'But you can set it manually too

 Possible Color Source Types are:

  • kAutomaticColorSource
  • kLayerColorSource
  • kOverrideColorSource (this is returned in case of oCurve.Color = oBlue)
  • kSheetColorSource


Inventor 2022, Windows 10 Pro
Sorry for bad English.

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

Post to forums  

Autodesk Design & Make Report