-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rhino Converter returns null if ReceiveMode is Ignore or Create #2985
Comments
Hi @Sticcia! Thanks for reporting this. It seems the converter is failing to create the same block definition over again, which causes the conversion to return null. On You may be seeing a message like this on the Rhino command window Your use-case seems valid, and I'll admit it's not ideal to have things fail with no developer feedback so I'll talk to the team and try to come up with a way forward that is more intuitive and hopefully better documented! 🙌🏼 |
Hi @AlanRynne, Thanks for the quick support. |
Renaming the definition to something else would do. Block definitions are matched by name from the Ideally, this is something we should both fix so that create mode works and also clarify what should be the expectation for it. |
Prerequisites
What package are you referring to?
Converters/ConverterRhinoGh
Describe the bug
We are setting up a Rhino Converter as follows:
Then using it to convert a a
BlockInstance
withConverter.ConvertToNative()
.This works fine if we leave the
ReceiveMode
to the default valueUpdate
but we if we change it toCreate
orIgnore
,Converter.ConvertToNative()
returns null when converting the same object twice.Added the following to the converter setup block above:
With this configuration,
Converter.ConvertToNative()
returns the expected result on the first execution but null on all the following runs.We need to convert the same object multiple times, with
ReceiveMode.Update
the object is replaced instead of creating a new object.I tried replacing the
id
andapplicationId
on theBlockInstance
, is there something else that needs to be done before callingConverter.ConvertToNative()
?To Reproduce
Converter.ReceiveMode = ReceiveMode.Create;
Converter.ConvertToNative()
on aBlockInstance
(successful)Converter.ConvertToNative()
on the sameBlockInstance
(returns null)Expected behavior
Converter.ConvertToNative()
always returns the convertedBlockInstance
adding a new block to the Document every time.System Info
Failure Logs
No logs, also
Converter.Report
has no errors.Proposed Solution
The text was updated successfully, but these errors were encountered: