Hello to all,
I am trying to create custom icons for nodes to upload with a package. Any suggestions? I already tried to use GitHub suggestions but with no rsults. I have a System.Drawing.dll ERROR.
Is there someone that could share with me his project folder? with a correct csproj version?
Or maybe a System.Drawing.dll that works
Many thanks in advance!
Hello to all,
Hi @Elisabetta_Caterina! I assume you mean this Dynamo wiki page. I don’t remember having any issue with any library, only make sure you follow all steps and have extra care when editing the “AfterBuild” text on the csproj file.
I have the JsonData package published on GitHub with custom icons implemented. Hope it helps as reference!
Many thanks, actually i don’t have anything on the “AfterBuild” part of the code.
I added but nothing change at all
This will also work. I use this method in my package… the important thing here is that it use .net 2.0, and that includes installing .net 3.5 on windows 10 computers!
<Target Name="BeforeBuild"> <GetReferenceAssemblyPaths TargetFrameworkMoniker=".NETFramework, Version=v2.0"> <Output TaskParameter="FullFrameworkReferenceAssemblyPaths" PropertyName="FrameworkAssembliesPath" /> </GetReferenceAssemblyPaths> <GenerateResource UseSourcePath="true" Sources="$(ProjectDir)PackageImages.resx" OutputResources="$(ProjectDir)PackageImages.resources" References="$(FrameworkAssembliesPath)System.Drawing.dll" /> <AL TargetType="library" EmbedResources="$(ProjectDir)PackageImages.resources" OutputAssembly="$(OutDir)Package.customization.dll" /> </Target>
@alvpickmans i also notice a difference on procedures. I am not using a Zero Touch Assembly or NodeModel assembly(i don’t know).
What i was trying to do was this https://github.com/DynamoDS/Dynamo/wiki/Creating-Icons-for-Custom-Nodes
but i still not able to do it.
I mean i can have a .dll but actually no preview is available.
I published the VRIM package on GitHub and i really don’t understand what’s wrong.
I also notice a thing on your nodes
how did you do it??
The icons you ask for is stated in the first line of a node
add .Query or .Actions or .Create
<Workspace Version="22.214.171.1245" X="0" Y="0" zoom="1" ScaleFactor="1" Name="Family.AddSharedParameter|DanEDU" Description="Add shared parameter by name in a family document. Please note that a default shared parameter file must be set in Revit" ID="ad7d8df4-37c3-4a7d-ae5e-96fbcb44febb" Category="DanEDU.Revit.Create">
many thanks @erfajo !! It is the same i have! But still not working
I tried many times with no result.
Can i ask you which System.Drawing version and System.Windows.Forms did you use to build in the .resx?
And also, did you change the PackageImages “name” with your “package” name? or you left them default as the script you send me?
And another question
did you use the ID=“4cdf5500-fe21-402e-acb7-bb9fc1b5a64b” or the SampleLibraryZeroTouch.Examples.PeriodicUpdateExample.PointField.Small.png to encode images?
mine looks like this, as you can see my system.drawing is 4.0.30319
I didnt use the SampleLibraryZeroTouch.Examples, I build my own C# project from scratch
My newest project is using .net 4.6, which is going to be a full zerotouch package.
Thank you! Probably my problem is the system.drawing
because i can’t understand why is not working.
@Elisabetta_Caterina because you are using .dyf files you should use the ID of the custom node as the name of the entry in the customization dll, it looks like you are using the function name- which is how it is done for zero touch nodes.
Ok finally i understand. I needed to call the Customization.dll as Package.Customization.dll and not with my definition name.
I got it!!!