Welcome, Guest
Python Scripts for ComicRack

TOPIC: How to import Comicrack datatypes?

How to import Comicrack datatypes? 9 years 8 months ago #904

  • dfuse
  • dfuse's Avatar
  • Offline
  • Senior Boarder
  • Posts: 76
  • Thank you received: 3
  • Karma: 4
I'm desperately trying to import the ComicPageType enum but it doesn't work for me somehow...
clr.AddReferenceByPartialName('ComicRack.Engine.Database') 
from cYo.Projects.ComicRack.Engine.Database import ComicPageType

clr.AddReferenceByPartialName('ComicRack.Engine') 
from cYo.Projects.ComicRack.Engine import ComicBookSeriesComparer

I added the import for the Comparer just to see if that would work (found it in one of wadegiles' scripts), and of course that works without any problem, why doesn't my import work? I get the following error message: Could not add reference to assembly ComicRack.Engine.Database
The administrator has disabled public write access.

Re:How to import Comicrack datatypes? 9 years 8 months ago #909

  • cYo
  • cYo's Avatar
  • Offline
  • Moderator
  • Posts: 3476
  • Thank you received: 676
  • Karma: 181
I guess you can simply use the integer values in the script
FrontCover = 0x0001
InnerCover = 0x0002
Roundup = 0x0004
Story = 0x0008
Advertisment = 0x0010
Editorial = 0x0020
Letters = 0x0040
Preview = 0x0080
BackCover = 0x0100
Other = 0x0200
The administrator has disabled public write access.

Re:How to import Comicrack datatypes? 9 years 8 months ago #910

  • dfuse
  • dfuse's Avatar
  • Offline
  • Senior Boarder
  • Posts: 76
  • Thank you received: 3
  • Karma: 4
true;
but you have no idea why the import would fail and the one of the comparer doesn't?
The administrator has disabled public write access.

Re:How to import Comicrack datatypes? 9 years 8 months ago #913

  • wadegiles
  • wadegiles's Avatar
  • Offline
  • Gold Boarder
  • Posts: 248
  • Thank you received: 3
  • Karma: 20
I think you are basing your namespaces on a previous version of the ComicRack.Engine assembly. cYo changed the namespaces significantly at some point moving things from the cYo.Project.ComicRack.Engine.Database namespace into the cYo.Project.ComicRack.Engine namespace.

Try this instead:

clr.AddReferenceByPartialName( 'ComicRack.Engine' )
from cYo.Projects.ComicRack.Engine import ComicPageType, ComicBookSeriesComparer
The administrator has disabled public write access.

Re:How to import Comicrack datatypes? 9 years 8 months ago #917

  • dfuse
  • dfuse's Avatar
  • Offline
  • Senior Boarder
  • Posts: 76
  • Thank you received: 3
  • Karma: 4
Of course...thanks, that did the trick
The administrator has disabled public write access.
Time to create page: 0.447 seconds

Who's Online

We have 255 guests and 3 members online