Message 1 of 8
Not applicable
07-30-2011
08:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Solved! Go to Solution.
Solved! Go to Solution.
HI ruiliu,
I saw your question in my blog. I ansered it follow your question.
The reason is that some projects are not successfully built. So Rvtsample cannot load them.
please replace AddSampleToPulldownMenu method with the following version. It can show you which dll is missing. so you need to build that project.
private void AddSampleToPulldownMenu(PulldownButton pullDownButton, SampleItem item)
{
try
{
PushButtonData pushButtonData = new PushButtonData(item.DisplayName, item.DisplayName, item.Assembly, item.ClassName);
PushButton pushButton = pullDownButton.AddPushButton(pushButtonData);
if (!string.IsNullOrEmpty(item.LargeImage))
{
BitmapImage largeImageSource = new BitmapImage(new Uri(item.LargeImage, UriKind.Absolute));
pushButton.LargeImage = largeImageSource;
}
if (!string.IsNullOrEmpty(item.Image))
{
BitmapImage imageSource = new BitmapImage(new Uri(item.Image, UriKind.Absolute));
pushButton.Image = imageSource;
}
pushButton.ToolTip = item.Description;
}
catch (Exception ex)
{
TaskDialog.Show("Error Project", item.Assembly + ", " + ex.Message );
}
}
Found them.
My bad, have missed a space in the rvtsample.txt when replacing the path.
Hope others will not make the same mistake as I do.
Thanks again. Mr. Ye.
![]()
I am having the same problem.
It shows me this
"RvtSamples
The assembly does not exist.
Parameter name: pushButtonData.AssemblyName"
Unfortunately Joe I cannot find the AddSampleToPulldownMenu method anywhere.
Where do I find this?
yes i have the same problem case which is all buttons is grey and the same message pop up
where we can find add sample
HI Revitlution ,
This method is in the application.cs file.
You can also find the method by searching the RvtSamples.
I compiled the SDKSamples2012 solution and changed the rvtsample.txt to match my system. (No error, only one warning saying
( "Warning 1 Function 'Execute' doesn't return a value on all code paths. Are you missing a 'Return' statement? C:\Program Files\Revit 2012 SDK\Samples\TypeSelector\VB.NET\Command.vb")
But when I tried to debug it in Revit environment.
It shows me this
"RvtSamples
The assembly does not exist.
Parameter name: pushButtonData.AssemblyName"
I can see the RvtSamples tab and all the buttons are grey that I cannot use them.
Any one knows what is going wrong. Thanks very much.